On May 3, 2012, at 7:09 AM, Charles Brunet wrote:

> No, it seems foreign keys aren't updated on the children rows and keep the
> temp negative value. I will try to manually set the PK value, as you
> suggest. But how can I get the last insert ID? This function exists in the
> cursor class, but not in the bizobj class. Or should I query the DB to get
> the max value for the PK field? Even that I'm not sure how to do it.

        That should be done for you if you have a) AutoPopulatePK set to True 
for the parent bizobj and b) FillLinkFromParent set to True for the child 
bizobj(s). When those are both set, saving a new parent record will propagate 
the new parent PK to the child bizobj's foreign key field.



-- Ed Leafe



_______________________________________________
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