» Home » updating » Page 1
How to avoid updating update_at flag while updating associated model in active record?
Category : Programming Languages

My association to models as follows


People model


belongs_to :category
has_one :account, :through => :category


category model


belongs_to :account
has_many
:bookings


account model


has_many :categories


Level model


accepts_nested_attributes :peoples


I wrote



View Replies


Efficient way to be updating child records when updating the Master table using Linq
Category : Programming Languages

I currently use a general repositry class that can update only a single table like so


public abstract class MyRepository<T> : IRepository<T>
where T : class
{
protected IObjectSet<T> _objectSet;
protected ObjectContext _context;
public MyRepository(ObjectContext Context)
{
_objectSet = Context.Cr

View Replies


MKMapview custom image not updating for user location updating using kvo
Category : Web Design


In the viewDidLoad method,
I am using the following KVO


[mapview.userLocation addObserver:self forKeyPath:@"location" options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld)
context:NULL];

and the observer


- (void)observeValueForKeyPath:(NSString *)keyPath
ofObjec

View Replies


How to avoid updating the child object while updating parent in hibernate?
Category : Programming Languages

I don't knwo whether my desig itself wrong or what. but could any body give me a solution.
I have a Object, PlanningItem. From this i need to get the records form another table by using two properties of PlanningItem. so i created view and and added that view as one to many relation record in PlanningItem. when i was updating the Planning Item i am getting error.
In this i am ready to


View Replies


MySQL not updating single field in database while updating others
Category : Programming Languages

I am using Zend Framework 1.10.8 and MySQL Server 5.1.X. I create my data array to update the record but only one field updates.


<?php
$where = "`character_id` = '5'";
$healthGained = 5;
$data = array();
if ($healthGained > 0) {
$data['character_current_health'] = $character['character_max_health'] + $healthGained;

View Replies


Nhibernate Updating - Solutions for updating children on an entity?
Category : Web Design

Looking for some advice on how to update a collection on an entity. In a web app - we have a multiselect listbox allowing a user to assign and remove child entities from a list of available entities. The user would select the relevant children to associate with the parent. i.e. Product with multiple Categories it could belong to. Once the user is satisfied, they submit and we update the entitie


View Replies


error updating a view (row cannot be located for updating)
Category : Databases

I have a table in my DB that has my Product information. this table has a tree structure (each record has a ParentId field to refer to its upper level record, it has 5 levels).
I have a view on this table. in this view I have joined my Product table to itself several times to have my product and its grouping information on higher level all in one row.
now I want to update


View Replies


Mysql: Possible to force updating of a second column after updating the first?
Category : Development Tools & Services

I have a Mysql database that stores login data. The passwords and salts are saved as sha512 hashes. Now, should the value in the password column be changed, I would like to implement a condition that the salt MUST be changed, or the mysql command is invalid.


CREATE TABLE loginData(
id int UNSIGNED SERIAL DEFAULT VALUE,
email varchar(64) NOT NULL,
password binary(64

View Replies


HTML5 seekBar not updating after clicked despite updating its value
Category : Development Tools & Services

I've been digging around for a while looking for why the seekBar is not updating after being clicked, and no luck so far. I've been doing this in Chrome because Firefox doesn't natively support the HTML5 audio tag.


Here's basically what I've got:


<script>
var seekBar;
var player;
function initPlayer(){
seekBar = document.getElement

View Replies


MySQL: Updating entry WITHOUT updating timestamp
Category : Databases

I have a timestamp in a mysql table with attribute "ON UPDATE CURRENT_TIMESTAMP". Is there a way to manually disable updating the timestamp on a special occasion? (eg: updating the entry to revise a blog post, but not to re-date it)


View Replies


Next
2012 / 2017 Copyrights BigHow , All Rights Reserved .