Using EJB 2.1, I have 2 CMP Entities persisted on 2 different datasources. Now I want to create a unidirectional many-to-one relationship where the many side sees the one side and the one side is blind. But, I get an EJBException wrapping an SQL error:
javax.ejb.EJBException: Load relation failed; CausedByException is: ORA-00942: table or view does not exist
// Data Source if(metadata.getRelationMetaData().isTableMappingStyle()) { dataSource = metadata.getRelationMetaData().getDataSource(); } else { dataSource = hasForeignKey() ? entity.getDataSource() : relatedEntity.getDataSource(); }
* @ejb.relation * name="Order-Security" * role-name="many-Orders-belong-to-one-Security" * target-role-name="one-Security-has-multiple-Orders" * target-ejb="Security" * target-multiple="yes" * * @jboss.relation * fk-constaint="false" * fk-column="SECURITY_ID" * related-pk-field="securityId"