Hello everbody, I just encountered a problem around decomposed m:n mapping, i looked through the code but have no final solution yet.
Let me explain my problem (using 1.0rc1, references and collections are proxies, classes itself not) : There are three classes Left <-----> Middle <-----> Right Left has a primary key left_id and Right has a primary key right_id, the primary key of Middle is composed of two columns left_id and right_id (nothing special so far...). Now i have a piece of code which constructs a Middle object the following way: Left l = getItFromQuery(); Right r = getItFromAnotherQuery(); Middle m = new Middle(); m.setLeft( l); m.setRight( r); broker.store( middle); And, suprise, suprise, the new constructed Middle object is not stored in the database and there is neither an error message nor an exception. I tracked it down to Identiy.init() and BrokerHelper.getKeyValues() which deliver an empty primary key for my new object (this error is silently ignored by PersistenceBrokerImpl.storeToDB() Method). The class descriptor is only asked for the pk fields and these are null, because they were never set... So you have to maintain reference ids yourself if they are part of the primary key whereas ojb maintains them if they are NOT part of a primary key. Is this a bug or a feature ? :) tia Uli --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
