On Tue, 2003-11-04 at 16:34, Alexey Loubyansky wrote:
> Do you define relationships in jbosscmp-jdbc.xml?

Yes. It was generated through xdoclet.
> 
> 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?
> 

When happens that the entity in the database has no primary key, we must
generate a key for the entity bean which may not exist in database,
right? But if that key has no persistence, how the container will handle
it? And the cluster works fine with that (probably)?


Now, I'm getting this error (I think it's a dummy one):

[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]

Again, my long relation (xdoclet):

    /** 
     * @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();

Note that the primitiveId or SIDId names are my fields in the entity
beans which are different from primitive_id and sid_id (database
attributes).

So, what is wrong here?

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/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to