1 Reply Latest reply on Feb 21, 2006 12:07 PM by Jens Elkner

    PK, FK, referenced column problem for ejb3 entity in RC4.

    Alex Palko Newbie

      Is it possible in RC4 to describe ejb3 entities for 3 tables that has column that is PK and FK for table A, PK and FK for table B and PK for table C?
      RC4 ejb3 container cannot correctly process entity for table B (while RC3 can correctly process this situation with AccessType.FIELD).

      For example, table B is table COMPANIES in ORACLE. CLIENTID is PK and FK for table COMPANIES, PK and FK for table COMPANIES_STR and PK for table CLIENTS.

      In this case of entity description

      public class Companies implements Serializable {
       @Column(name="CLIENTID", nullable=false)
       public Long clientid;
       @JoinColumn(name="CLIENTID", referencedColumnName="CLIENTID")
       public Clients clients;
       @JoinColumn(name="CLIENTID", referencedColumnName="CLIENTID")
       public Collection<CompaniesStr> companiesStrCollection;

      As a result of deployment I received altered table COMPANIES with new wrong column ?CLIENTS?.
      Is it possible in this version of EJB3 to describe these relationships correctly?