I was testing the current state of the relation code and I believe I have stumbled across a bug.
If the primary key class of relationship is different then it bombs. So if you have table_a and table_b in a 1-1 uni-directional relationship with table_a primary key class of TableAPk and table_b primary key class TableBPk it bombs. It looks like the problem is in JDBCCMRFieldBridge.java around line 780. When it is creating and setting the primary key of the CMRField. fk = foreignKeyFields[i].setPrimaryKeyValue(fk, fieldValue); The problem is that if fk is null it creates a Pk class but in foreignKeyFields the entity is current class not the related one. So for TableA CMR field is is creating a class of TableAPk not TableBPk. I added the this before the call and it seems to work if(fk == null) fk=relatedManager.getEntityBridge().createPrimaryKeyInstance(); _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
