On Tuesday, November 09, 2010 01:09:31 pm Carey Gagnon wrote: > > Something confusing to me is which is the child table in this case? > > > > Johnf > > As you assumed when you gave me the previous code, the parent is builders, > and the child is contacts. > > I had a hell of a time figuring out how to setup the parent child even > after watching the Using the Data Environment screen cast several time > because in the screencast the self.addBizObj(whatever) is added to the > actual app/biz/bizobj.py file but mine is set up like the Client Hours > tutorial with the self.addBizObj(whatever) in the frmWhatever-code.py > file. > > But it works now...and I'm a happy camper. > I know actual sample apps are lacking which has made it tough for me to > learn (use the Source Luke). > When I get this thing done I plan to release it under gpl 3 so that other > may have something to look at and learn. > > I don't actually want to maintain an app just provide an example. Wonder if > Paul and Ed would host it. > > Carey
If the parent is the "builder" and the child are the "contacts" then why isn't the parent (builder) already on the correct record? You have no need to query. If you set the parent to a record the child will follow - is the rule. In this case the parent "builder" should be on the correct record. If that's not right then something is wrong - IMHO. BTW I asked about the relationship of the tables because it looks like you are setting up a many to one from the opening form I saw. Where the "contacts" is the many and one is the "builder". In that case I would have reversed the relationship. Where I setup the "contacts" as the parent and child the "builder". So as I selected contacts from the grid the FK of "contacts" would force the "builder" pkid to follow. And again I'd have no need to query the database because of the parent->child relationship I set in the framework. Ed and Paul accept all the examples they can get as long as they follow the Dabo framework rules. I'm sure you are allowed to post to the wiki. Not sure about hosting to allow the code to run? You have to ask. Johnf _______________________________________________ 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/201011091329.38502.jo...@jfcomputer.com