-
1. Re: No CMR support with JBoss 3.2 get-generated-keys
skoteinos Feb 6, 2003 6:37 AM (in response to bobo1025)Hi
I had nearly the same problem. I use an unknown primary key and a key-generator (at the bottom you can see the relevant code). The trick there is to include a <field-name> Element into the <unknown-pk> Element, than you can reference this PK in a relationship :
<key-fields>
<key-field>
<field-name>somePK</field-name>
<column-name>someFK</column-name>
</key-field>
</key-fields>
I hope this helps.
Greets
------------------------------------------------
<unknown-pk>
<unknown-pk-class>java.lang.String</unknown-pk-class>
<field-name>somePK</field-name>
<column-name>somePK</column-name>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(32)</sql-type>
</unknown-pk>
<entity-command name="KEY-GEN"
class="org.jboss.ejb.plugins.cmp.jdbc.JDBCKeyGeneratorCreateCommand">
UUIDKeyGeneratorFactory
</entity-command>