Sunday, May 20, 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 1: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 9: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: nesopo
Past 24 Hours Past 24 Hours: 0
Prev. 24 Hours Prev. 24 Hours: 0
User Count Overall: 1605

People Online People Online:
Visitors Visitors: 2
Members Members: 0
Total Total: 2

Online Now Online Now: