Hi Tino,
I wrote a quick test and can't reproduce the problem you described. The test do exactly what you described: - Movie m:n Actor - create an Movie object with dependent Actor objects - add already existing Actor's to the existing Movie object
movie.getActors().add(a_1); movie.getActors().add(a_2); broker.beginTransaction(); broker.store(movie); broker.commitTransaction();
This test pass (see ...broker.M2NTest#testAddNewEntriesTTTF in CVS)
This shouldn't be the problem, but do you avoid a RemovalAware Collection class in collection-descriptor?
e.g. by setting
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
http://db.apache.org/ojb/docu/guides/basic-technique.html#Support+for+Non-Decomposed+m%3An+Mappings
Please post more info (metadata mapping)
regards, Armin
Tino Schöllhorn wrote:
Hi,
several days ago I changed from RC6 to OJB 1.0.0 and so far it is running fine. But now I encounter a strange bug - something which has not happened with RC6.
I have a class Team and there is a N-M-Relation between Teams and Subteam.
Now I am adding some (already persistent) Teams t1...tn to another Team t:
Team t = ...... t.addSubTeam(t1); t.addSubTeam(t2);
PersistenceBroker pb = .... pb.beginTransaction(); p.store(t); p.commitTransaction();
Before the update OJB inserted all necessary rows in the database. But now there only the *last* added Team persistent. The other thing is, that t1 is not in the cache either.
But when I try to store Team t after each add-Statement the database and the object is correctly updated!
So is this a bug or am I missing something? I suspect it is an error of OJB ??
Glad for any help. Tino
--------------------------------------------------------------------- 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]