Monday, February 06, 2012 Register    Login
Instructions

In order to add new threads or reply to existing posts, you have to be logged-in. If you are not registered yet, you need to register first, and then login with your personal credentials.

   

CslaFactory Forums
HomeHomeSupportSupportCslaFactory CTPCslaFactory CTPProblem with _hydrated logicProblem with _hydrated logic
Previous
 
Next
New Post
8/6/2008 2:52 PM
 

I have created a parent class which has a list of children (composition).

I manually create a parent and add a child using this code:

parent = Parent.NewParent();
child = parent.Children.AddNew();
parent.Save();

However when parent.UpdateChildren() is called the varible parent._childrenHydrated is false and therefore the new child is not added to the database.

I think that the solution is to add the dollowing line to parent.Dataportal_Create():

parent.Dataportal_Create()
{
...
_childrenHydrated = True;
}

This will ensure that any new children will be saved correctly.

 
New Post
8/7/2008 10:47 AM
 

Thanks, Peter. I will add that.

Marcel

 
Previous
 
Next
HomeHomeSupportSupportCslaFactory CTPCslaFactory CTPProblem with _hydrated logicProblem with _hydrated logic


   

UsersOnline
Membership Membership:
Latest New User Latest: empirowe
Past 24 Hours Past 24 Hours: 2
Prev. 24 Hours Prev. 24 Hours: 0
User Count Overall: 1586

People Online People Online:
Visitors Visitors: 1
Members Members: 0
Total Total: 1

Online Now Online Now: