2 Replies Latest reply on Jul 1, 2002 2:00 AM by seshu kumar

    Problem with 1:1 CMP example from MasteringEJB2

    seshu kumar Newbie


      I'm trying to deply Order-Shipment 1:1 CMP example from EdRomans book.
      as in the book in my ejb-jar.xml I have,



      ......Relationship filed


      I have declared two methods in Order entity bean class as
      public abstract getShipment();
      public abstract void setShipment(Shipment s);

      The tables created by JBoss are as follows
      Table: Order
      Field 1: ORDERID(PK)
      Field 2: NAME
      Field 3: SHIPMENT

      Table: Shipment
      Field 1: SHIPMENT(PK)
      Field 2: CITY
      Field 3: ZIPCODE
      Field 4: ORDERS_SHIPMENT

      There is no FK constraint created.

      Obviously the foriegn key relationship os missing. Where should i specify this. Please help!