Hello Neal, specify key-fields for one of the ejb-relationship-role's. This should solve the problem.
alex Tuesday, October 08, 2002, 11:58:35 PM, you wrote: NS> Hi All, NS> Am I misunderstanding the meaning of Unidirectional? I have declared a NS> One to One Unidirectional relation from a RepositoryEntry to a NS> Signature. When JBoss creates the tables, RepositoryEntry is given a NS> signature field, as expected, but it also creates a RepositoryEntry NS> field in the Signature table. I don't care about being able to get NS> from a Signature back to its RepositoryEntry, in fact I want to be NS> able to add Signatures to other objects in my schema besides NS> RepositoryEntry. NS> What's going on? Here's the relations section from the ejb-jar.xml: NS> <relationships > NS> <ejb-relation > NS> <ejb-relation-name>entry-signature</ejb-relation-name> NS> <!-- unidirectional --> NS> <ejb-relationship-role > NS> <ejb-relationship-role-name>has-signature</ejb-relationship-role-name> NS> <multiplicity>One</multiplicity> NS> <relationship-role-source > NS> <ejb-name>RepositoryEntry</ejb-name> NS> </relationship-role-source> NS> <cmr-field > NS> <cmr-field-name>signature</cmr-field-name> NS> </cmr-field> NS> </ejb-relationship-role> NS> <ejb-relationship-role > NS> <ejb-relationship-role-name>signature-has-entry</ejb-relationship-role-name> NS> <multiplicity>One</multiplicity> NS> <cascade-delete/> NS> <relationship-role-source > NS> <ejb-name>Signature</ejb-name> NS> </relationship-role-source> NS> </ejb-relationship-role> NS> </ejb-relation> NS> </relationships> NS> And in my jbosscmp-jdbc.xml I've done the following: NS> <relationships> NS> <ejb-relation> NS> <ejb-relation-name>entry-signature</ejb-relation-name> NS> <foreign-key-mapping/> NS> <ejb-relationship-role> NS> <ejb-relationship-role-name>has-signature</ejb-relationship-role-name> NS> <fk-constraint>true</fk-constraint> NS> </ejb-relationship-role> NS> <ejb-relationship-role> NS> <ejb-relationship-role-name>signature-has-entry</ejb-relationship-role-name> NS> <fk-constraint>false</fk-constraint> NS> </ejb-relationship-role> NS> </ejb-relation> NS> </relationships> NS> The <fk-constraint> elements I added recently to see if they had an NS> effect on the Signature table, but they don't. NS> Next I tried making the multiplicity Many on the RepositoryEntry side NS> of the relation, and regeneration of the tables shows that the field NS> in the Signature table is not there anymore. Why is it present in a 1 NS> to 1 unidirectional relation, and not in a Many to One? NS> Thanks for enlightenment. :) NS> -Neal ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user