StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
Business Objects and Data Access (How do I?)
»
Form with a primary BO with two registers
Form with a primary BO with two registers
Post Reply
Like
2
Form with a primary BO with two registers
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Fabian R Silva, -
Fabian R Silva, -
posted 14 Years Ago
ANSWER
Topic Details
Share Topic
Group: StrataFrame Users
Posts: 153,
Visits: 1.2K
Hi, I need to save two records on a "primary" object,, 1 record related to some child BOs and the 2nd record to another childs.
If I have a parent-child relation it only will update the child pk with the first parent record pk?
How can I set that I like to set the 2nd record pk to be the parent pk of child BO registers?
I hope that It can be understand (sorry for me bad english)
thanks
Reply
Like
2
Reply
Edhy Rijo
E
Edhy Rijo
posted 14 Years Ago
ANSWER
Post Details
Share Post
E
Group: StrataFrame Users
Posts: 2.4K,
Visits: 23K
Hi Fabian,
Yes, you are correct about the BO.RegisterForeinKey() method. For a clear explanation check this
Post by Trent
where it is explained much better.
how I can set that 1st I like to save the "Invoice" BO and then "Payment" BO to make it the 2nd register every time?
Well when using
the BO.RegisterForeinKey() method, SF will take care of that for you, not matter which BO triggers the saving, it will go up to the parent bo to grab the PK. But in your case, it would be better for you to manage this logic yourself, create your own Save method using a BusinesLayer Transaction so you can have full control on how information is saved.
Once you have this done, you will be amazed on how powerful and flexible SF Business Objects are. Using the 2 BO instances will allow you to handle each record based on their transaction type (ex: Invoice or Payment) so you will always know which record you are managing.
Edhy Rijo
Reply
Like
2
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
Form with a primary BO with two registers
Fabian R Silva, -
-
14 Years Ago
Hi Fabian, [quote][b]Fabian R Silva, - (8/3/2012)[/b][hr]I hope that...
Edhy Rijo
-
14 Years Ago
Hello Edhy, thanks for reply. my project have the classic order -...
Fabian R Silva, -
-
14 Years Ago
Hi Fabian, [quote][b]Fabian R Silva, - (8/3/2012)[/b][hr]this can be...
Edhy Rijo
-
14 Years Ago
thanks, great for the explained detail, you mention "manually register...
Fabian R Silva, -
-
14 Years Ago
Hi Fabian, Yes, you are correct about the BO.RegisterForeinKey()...
Edhy Rijo
-
14 Years Ago
Post Reply
Like
2
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search