Lets say I have the following db table structure.
MainTable
Lookup1
Lookup2
I have a bizobj for each of these and now I like to have e.g. a grid
with the following
MainTable.name, Lookup1.name, Lookup2.name
and a corresponding Edit page.
I looked at the PyCon2010 and other entries on the wiki in relation to
foreign key definitions but I do not get it.
I thought I could maybe do something like this.
def afterInitAll(self):
app = self.Application
# child definitions
lookup1 = app.biz.Lookup1(app.dbConnection)
lookup1.LinkField = "fk_lookup1id"
self.addChild(lookup1)
lookup2 = app.biz.Lookup2(app.dbConnection)
lookup2.LinkField = "fk_lookup2id"
self.addChild(lookup2)
Above runs without issue but now how do I use this in the e.g. the grid?
Something like this "DataField="lookup1.name" would be nice but either I
need to set something else or ....
But looking at all the examples I see that one creates additional biz
objects, so I think I am going down the wrong road with the above, but I
also haven't seen a sample for a grid usage.
I keep looking, but would appreciate some pointers.
In the mean time I am installing MySql so I can try out PyCon2010 code
out of the box.
Werner
_______________________________________________
Post Messages to: [email protected]
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/[email protected]