Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question about design with Business object
Message
 
To
10/05/2001 08:22:01
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00504443
Message ID:
00505773
Views:
26
>Translated as.....
>
>"In UML I defined a class named "storage". To implement I need it 2 tables and in both tables I need to update information, nevertheless the business object only allows for one table. Kevin made a comment where he said that the Business object could work with more than one table, using methods to be able to update 2 tables in business object and that the "standard" is to work on one table."

Thanks for the translation John.

Francisco,
you have 2 options... you can man handle this and force one bizobj to update both tables. This would mean using a lot of DODEFAULT() calls in framework methods for add/edit/delete action and than manually handling the second table yourself either by your all own code or by changing the initialselectedalias after a DODEFAULT and recursively calling the same method again. In my opinion this is NOT a good way to handle this.

The better option is really to setup 2 bizobjs, one for each table that needs updated, then setup a parent-child relationship between the two. I know this method can seem a little scary when your new to the framework because it feels like your making it twice as hard to manage. But never fear, in the long run this is truly the better way to go. Plus too, the business object builder in the current version of the framework makes setting up parent-child bizobjs so much easier nowadays. Check out page 73 of the devguide.doc for details.


Hey Kevin - I went looking in projmgr app for an example of parent-child bizobjs to show Francisco & couldnt find one.... yeah it's been awhile, but I could of sworn you had another example of this somewhere for us? Or am I imagining things again?
Roxanne M. Seibert
Independent Consultant, VFP MCP

Code Monkey Like Fritos
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform