Hi Bj�rn,

Bj�rn Voigt wrote:

Hello Group,

I want to develope a form app with cocoon forms using ojb.
I have a 1:n business-model like ProductGroup - Articles (one group has n article).


I am using the PB-Api and i have realized the 1:n
relation with a collection in ProductGroup.

CocoonForms allows me to bind the model to a form.
It is possible to describe a repeater, which shows the
Article-Items inside the collection. So I defined a binding between
an group and a form, a repeater shows all articles of a group.
The repeater allows to insert and delete new Articles from
the collection.

Ok now my problem, If I get a Group-Object from DB with
n Articles inside the collection, bind it to the form and remove
some of it from the collection, how can I autodelete it from the
article table, too? Is this possible with a one and only

broker.store(group)

How I have to define the mapping?


Define a 1:n mapping between ProductGroup and Article and use a RemovalAware collection-class in collection-descriptor (Currently it's used by default, so no need to specify).


Please see
http://db.apache.org/ojb/docu/basic-technique.html#Mapping+1%3An+associations

regards,
Armin


Thanks for your help

Bj�rn Voigt


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to