You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Volker Janzen <v....@uniorg.de> on 2003/12/03 09:27:54 UTC

non-decomposed mapping and deletions in PB

Hello All,

i have the following problem (maybe a configuration problem but i don't 
know where).

Tables:

user (id,username)
role (id,rolename)
userrole (userid,roleid)

i use non-decomposed mapping with the PersistenceBroker API and 
ManageableArrayList.

broker.beginTransaction();
broker.store(user);
broker.commitTransaction();
broker.clearCache();

UseCase: PersistenceBroker stores objects (User) with a collection of roles.

Problem: removal of roles (ArrayList.remove()) and storing the user 
delete records in the indirection-table only when no other user exist 
who has the same role. in other words -> if two user have the same role 
the PB doesn't remove the relation for any of these two user-objects.

Adding roles is no problem. updating other user-attributes is no problem.

How do i solve this?

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org