Code subject: Cascade.All and persisting related entities directly
Posted: Sun May 09, 2010 9:18 pm
Joined: Tue Mar 27, 2007 10:55 pm Posts: 2103 Location: Earth Has thanked: 39 time Have thanks: 57 time
If you have a one to one relation between two entities , you can use cascade property to specify cascade type . If you set it to Cascade.All . Saving one entity will save the other one automatically . Look for the following example please :