On Nov 16, 2009, at 4:32 AM, Miguel Lopes wrote:
> During the creation of a record I want to create some children at the
> same time. I'm wondering if this approach would be feasible:
>
> Setting a bizobjs attribute with a dataset of to be children. This
> way:
> * the user selects the child record in the same form the parent record
> is created
> * in code a dataset of children is assigned to a bizobj attribute
> * in beforeSave() bizobj start a transaction
> * in the after save use the dataset attribute to create the children,
> commit and reset the dataset attribute
>
> Is this the right approach?
Do you have separate bizobjs for the parent and child tables? If so,
this behavior is already built into Dabo: set the NewChildOnNew
property in the parent to True, and the NewRecordOnNewParent property
to True in the child. Then when a new parent record is created, a
related child record will also be created.
-- 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]