jaystack / jaydata

Notice: this library isn't maintained anymore
http://jaydata.org
GNU General Public License v2.0
354 stars 95 forks source link

Deep updates #283

Open bstaley opened 7 years ago

bstaley commented 7 years ago

@lazarv or @robesz

Can I get some guidance? I have this structure

class User {
    Id: int,
    Contact: Custom.Namespace.Contact
}

and I'm trying to do something like

context.Users.attachOrGet({Id:1}).Contact.FirstName = "Sam";
context.saveChanges();

Though I get an exception because Contact is undefined. Is it possible to do deep updates? If so can you give an example or point me to some documentation?

bstaley commented 7 years ago

Is this available or planned to have?

bstaley commented 7 years ago

Would enableDeepSave allow for deep updates to work out of the box?