RegisterForeignKey


Author
Message
Aaron Young
Aaron Young
Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
Hi,

I have tried to use RegisterForeignKey but when I try a FillByParentPrimaryKey on the child it throws an error saying the ParentRelationship must be set first. I set the foreign key with the following code:-

parentBO.RegisterForeignKey(childBO, "FKField");

Then when I run the following code it throws the error.

childBO.FillByParentPrimaryKey(parentBO.PKField);

I guess I am doing something wrong but I can't see what. The RegisterForeignKey is definitely run first.

Any help would be appreciated.

Aaron


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Aaron Young - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Aaron Young - 17 Years Ago
                 Glad it made sense :)
Trent L. Taylor - 17 Years Ago
Aaron Young - 17 Years Ago
                         I will try and setup a sample and post it in the next couple of days...
Trent L. Taylor - 17 Years Ago
                             Okay thanks - I appreciate that. Aaron
Aaron Young - 17 Years Ago
                                 OK...there is one piece missing here as the RegisterForeignKey behaves...
Trent L. Taylor - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search