﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » Business Object Relationships</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 12:20:54 GMT</lastBuildDate><ttl>20</ttl><item><title>Business Object Relationships</title><link>http://forum.strataframe.net/FindPost713.aspx</link><description>I've got 3 business objects defined as follows:&lt;/P&gt;&lt;P&gt;CaseBO {pkCaseId, CaseDesc, fkClientId, fkContactId}&lt;/P&gt;&lt;P&gt;ClientBO {pkClientId, ClientName}&lt;/P&gt;&lt;P&gt;ContactBO {pkContactId, ContactName, fkClientId&lt;/P&gt;&lt;P&gt;I've created a form, called Case Form&lt;/P&gt;&lt;P&gt;On my Case form I have an instance of all three BO's, successfully related, and as I navigate the CaseBO I can display any number of fields from the related Client and Contact BO's. All's well so far...&lt;/P&gt;&lt;P&gt;Now I create a second form, Client Form.&lt;/P&gt;&lt;P&gt;I drop an instance of the ClientBO and ContactBO and begin to setup the relationships...here's where I run into an issue. In order to setup a&amp;nbsp;relationship between these instances of ClientBO and ContactBO on the new form (clientBO1.pkClientId&amp;lt;-&amp;gt;contactBO1.fkClientId), I have to break the relationships I'd set up on the first form (caseBO1.fkClientId&amp;lt;-&amp;gt;clientBO1.pkClientId &amp;amp; caseBO1.fkContactId&amp;lt;-&amp;gt;contactBO1.pkContactId)&lt;/P&gt;&lt;P&gt;It seems that a BO will only allow one association? I'm sure I'm missing something here, I don't think that's correct because, if it is, I'd have to create a new BO for each kind of association...duplicating a lot of code in the process.&lt;/P&gt;&lt;P&gt;TIA,&lt;/P&gt;&lt;P&gt;Rob</description><pubDate>Tue, 28 Mar 2006 11:35:06 GMT</pubDate><dc:creator>Robert Linton</dc:creator></item><item><title>RE: Business Object Relationships</title><link>http://forum.strataframe.net/FindPost748.aspx</link><description>Yes.&amp;nbsp; Drop a BusinessObjectLinkManager on a form and set the respective properties.&amp;nbsp; You will also need to have the three business objects that you plan to use on the form so they can be associated with the LinkManager.&amp;nbsp; As you move forward let me know if you have any questions.&amp;nbsp; We will be releasing the docs for this in the next week.</description><pubDate>Tue, 28 Mar 2006 11:35:06 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Business Object Relationships</title><link>http://forum.strataframe.net/FindPost747.aspx</link><description>Is this just a matter of dropping the link manager on a form and setting the properties?</description><pubDate>Mon, 27 Mar 2006 22:35:25 GMT</pubDate><dc:creator>Kevin Lingofelter</dc:creator></item><item><title>RE: Business Object Relationships</title><link>http://forum.strataframe.net/FindPost717.aspx</link><description>Rob,&lt;br&gt;
&lt;br&gt;
Yes, you define the relationship parameters at the class level, so a business object is intended to have the same relationship parameters, no matter what the instance.  However, the actual business object that comprises the other end of the relationship is defined on a per-instance basis.  So, you define the parent relationship parameters once, which defines the fields that make up the key, and then you assign the parent object on a per-child instance basis.&lt;br&gt;
&lt;br&gt;
As you mentioned, however, you can create two different associations by creating two different business object classes... but, you can avoid the code duplication by inheriting one from the other.  The subclass would then only need to redefine the relationship parameters.&lt;br&gt;
&lt;br&gt;
Now, in the case of a many-to-many relationship, where the link table requires two different relationships at the same time, you can use the BusinessLayerLinkManager class.  It allows you to specify the relationships between the 3 business objects that comprise the many-to-many relationship and will maintain the referential integrity between those 3 business objects.</description><pubDate>Fri, 24 Mar 2006 09:38:01 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>