The table might not have a primary key but entity must have according to the spec. Do you have primkey-field defined in ejb-jar.xml?
Pedro Salazar wrote:
Greetings,
I have a table Access_Permission that _has_ relation 1-* to Access_Schedule.
This table Access_Permission has two attributes (uniques), A1 and A2, that would be the foreign keys of the table Access_Schedule.
Access_Permission Access_Schedule ----------------- --------------- A1 -- 1-N --> A1 A2 A2 ... ... (A1,A2) UNIQUE (A1,A2) FK
These tables are mapped in two entity beans (CMP). The Access_Schedule bean has no primary keys, only foreign keys. I defined a relationship between them (access_permission_schedule), but I'm getting this error when deploying the beans:
" Atleast one role of a foreign-key mapped relationship must have key fields (or <primkey-field> is missing from ejb-jar.xml): ejb-relation-name=access_permission_schedule] "
I'm using xdoclet to generate the descriptors and this is the entry of my relation on Access_Permission bean:
/** * @ejb.relation
* name="access_permission_schedule"
* role-name="X1"
* cascade-delete="no"
* target-ejb="AccessSchedule"
* target-role-name="X2"
* @ejb.interface-method
* view-type="local"
* @ejb.transaction
* type="Supports"
*/
public abstract java.util.Collection getSchedule();
Any comments are welcome!
thanks, Pedro Salazar.
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
