On Mon, Nov 16, 2009 at 1:50 PM, Ed Leafe <[email protected]> wrote:
> 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
>

Yes Ed. There's one bizobj for both the parent and child tables. But
there I still haev two probelms:
1. I may or may not have one or more children. So automatic child
creation should not be used.
2. Which approach to choose for passing the child information
(potentially more than one child). Should I go with this idea of
assigning a bizobj attribute?

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