I am trying to declare an one to many relation by using xdoclet. What is meant by the message below:
Role: xxx with multiplicity many using foreign-key mapping is not allowed to have key-fields....
10:11:03,089 ERROR [EntityContainer] Starting failed
org.jboss.deployment.DeploymentException: Role: xxx with multiplicity many using foreign-key mapping is not allowed to h
ave key-fields
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData.loadKeyFields(JDBCRelationshipRoleMetaDa
ta.java:357)
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData.init(JDBCRelationshipRoleMetaData.java:1
57)
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationMetaData.(JDBCRelationMetaData.java:314)
Maybe your key-fields declaration is on the wrong side of the relationship. It only applies to the FK side in one to many relationship.
-- Juha