tags:

views:

18

answers:

1

Hi, if dupe question sorry tight deadline and didn't find right away.

Seems when I add a new record via Subsonic v3 it does get added but then when I try to update a value the update doesn't happen as the _isLoaded is false.

user.username = "batman";
user.Add();

address.address1 = "1234 Anyhwere St";
address.Add();

user.AddressID = address.ID;
user.Update();

The AddressID of the user iActiveRecord never gets updateded as it seems the _isLoaded wasn't true at the time of the AddressID setter property.

Am I missing something? Please advise.

A: 

The way I got this to where it would update after an add is manually using the 'SetIsLoaded' method on the activerecord class

user.Add();

user.SetIsLoaded(true);
user.AddressID = address.ID;
user.Update();

Seems kinda smelly to me, but it does work.

CmdrTallen