On Sun, May 17, 2009 at 3:06 PM, Ed Leafe <e...@leafe.com> wrote: > On May 17, 2009, at 6:23 AM, Miguel Lopes wrote: > > > But the bizobj also encapsulates relationships and this sparks the > > need for > > several bizobjs from the same table, or not? Let me give you an > > example: > > > > account.account_id = contact.account_id (1 Account, M Contact) > > opportunity.opportunity_id = contact.opportunity_id (1 Opportunity, M > > Contact) > > > > So contacts are assigned to Acounts, but they may also be assigned to > > Opportunities. > > IMO, that sounds like a poor data design. Perhaps there was a > reason > for doing it that way, but an account and an opportunity are the same > thing; the difference is simply a matter of time. In systems I've > designed, you would have a customer table with a way to distinguish > the two states: either a bit field, or simply links to related tables > that hold the additional columns that need to be tracked for an > opportunity and an established account. >
No. The design is good. Here an Opportunity is not a possible future account (customer). Trust me, the data is as normalized as it should be. An Opportunity is like a "project" the Account has. You can think of it like having the opportunity of selling/extending a new app to an existing customer because they are, for example, opening a new branch office. The issue in discussion is about having the need to relate a Bizobj based on table X (DataSource='X') with two different parents. This is certainly a conceivable design. But how can we accomplish this design without two different Bizobjs with the same DataSource. It occured to me that I could have just one contacts Bizobj and instantiate it twice using the LinkField as a parameter in the constructor. This way we get the benefit of having all the logic pertaining to the table in the same class. Could this be a way? Or what am I seeing wrong here? How would you do it? Miguel --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: Dabo-users@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/a19730800905171418n235b9831rd8a6a080fa14c...@mail.gmail.com