Nate Lowrie wrote:
> I have a database that has a Persons and a Customers table.  The structure is:
> 
> Persons:
>   - PersonID
>   - etc...
> 
> Customers:
>  - CustomerID
>  - PersonID
>  - etc...
> 
> I am using a mysql database.  The PersonID is a foreign key field in
> the database.  For lookup purposes, I want to create a customers
> bizobj that joins both tables by the PersonID field.  My question is
> with new insertions.  If I call bizobj.new(), I would like it to
> create a new entry in each table.  Is that possible using the one
> bizobj in this configuration?  Will the personID field be filled in
> the Customers table automatically?  Right now I have 2 separate
> bizobjs but would like to condense it into one.  Thanks.
> 
> Nate L.

I have a similar form for a 1:1 relation of Jnp and Person.
Jnp can be the master table of either a company or a person.
I'm using a Jnp bizobj which joins to Person for browsing,
but have to use two bizobjs for my insert/edit form.

This is my createBiobj method:
     def createBizobjs(self):
         jnpBizobj = JnpBizobj(self.Connection)
         self.addBizobj(jnpBizobj)
         perBizobj = PerBizobj(self.Connection)
         perBizobj.LinkField = "jnp_iid"
         perBizobj.FillLinkFromParent = True
         jnpBizobj.addChild(perBizobj)
         self.addBizobj(perBizobj)

         jnpBizobj.NewChildOnNew = True
         jnpBizobj.RequeryChildOnSave = True
         perBizobj.NewRecordOnNewParent = True

Uwe


_______________________________________________
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]

Reply via email to