Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Child Business Objects definitely not working right
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Child Business Objects definitely not working right
Miscellaneous
Thread ID:
01474206
Message ID:
01474206
Views:
89
Something is definitely wrong with something, and I've been spending 16 unbillable hours trying to track it down! Before I start digging again, I thought I'd post and see if anyone here knows what's up.


My page starts:
  protected void Page_Load(object sender, EventArgs e)
    {
        // Instantiate and register the business objects
        oContact = (Contact)this.RegisterPrimaryBizObj(new Contact());
        oMemberLink = (MemInd)this.RegisterBizObj(new MemInd());
        oContact.RegisterChildBizObj(oMemberLink);
When I have the MemInd class's autoSaveonParentSave set to false (ie, the default), the child object doesn't save. That's fine. When I turn it on, ie
protected override void HookConstructor()
		{
			// Place code here to be executed when the business object instantiates
            this.AutoSaveOnParentSaved = true;
            this.ForeignParentKeyField = "numIndId";
		}
it actually blanks out the numIndId field to zero, and also another field that I had set. I cannot figure out why this is happening! I'm a bit dizzy with all the deep diving into the code to see where it's happening, so I can't quite pin that down right now but it seems to be fine in the dataset up until the checkRules() method is called. Is there anything I'm obviously doing wrong?

Thanks,

Eric
Next
Reply
Map
View

Click here to load this message in the networking platform