Greetings,
I have a table Access_Permission that _has_ relation 1-N to
Access_Schedule.
This table Access_Permission has two attributes (uniques), SID_ID and
PRIMITIVE_ID, that would be the foreign keys of the table
Access_Schedule.
Access_Permission Access_Schedule
----------------- ---------------
SID_ID -- 1-N --> SID_ID
PRIMITIVE_ID PRIMITIVE_ID
... ...
(SID_ID,PRIMITIVE_ID) UNIQUE (SID_ID,PRIMITIVE_ID) FK
These tables are mapped in two entity beans (CMP). The Access_Schedule
bean has *no primary keys*, only foreign keys. I created a field in the
entity that not exist in the database (I don't know if this is the right
procedure):
/**
* @ejb.pk-field
* @ejb.interface-method
* view-type="local"
* @ejb.persistence
**/
public abstract void setUnknownPK(int unknownPK);
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_TO__access_schedule"
* role-name="access_permission_HAS_schedules"
* cascade-delete="no"
* target-ejb="AccessSchedule"
* target-role-name="schedules_BELONG_TO_access_permission"
* target-cascade-delete="yes"
* @ejb.interface-method
* view-type="local"
* @ejb.transaction
* type="Supports"
* @jboss.relation
* related-pk-field="SIDId"
* fk-column="SIDId"
* @jboss.relation
* related-pk-field="primitiveId"
* fk-column="primitiveId"
* @jboss.target-relation
* related-pk-field="SIDId"
* fk-column="SIDId"
* @jboss.target-relation
* related-pk-field="primitiveId"
* fk-column="primitiveId"
* @jboss.relation-mapping
* style="relation-table"
* @jboss.relation-table
* table-name="uif_access_permission"
*/
public abstract java.util.Collection getSchedules();
This is the error I got:
...
[ObjectName: jboss.j2ee:jndiName=ejb/AccessScheduleLocal,service=EJB
state: FAILED
I Depend On:
Depends On Me: org.jboss.deployment.DeploymentException: CMP field for
key not found: field name=SIDId, ObjectName:
jboss.j2ee:jndiName=ejb/AccessPermissionLocal,service=EJB
state: FAILED
I Depend On:
Depends On Me: org.jboss.deployment.DeploymentException: CMP field for
key not found: field name=SIDId]
Any comments are welcome!
thanks,
Pedro Salazar.
--
-PS
-------------------------------------------------------
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/
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user