1 Reply Latest reply on Nov 11, 2003 1:09 PM by Alexey Loubyansky

    Composite pk containing a fk

    senthilcool Newbie

      If I have an entity using a composite primary key which includes a foreign key (as part of the pk) then I have to have cmp and cmr fields for the fk. Having this causes the container to do additional queries to confirm the existence of the related object (getRelatedEntityByFK() method in org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge). Is there a way to avaoid this? Can I have this work without creating the cmp fields for the fk?