1 Reply Latest reply on Oct 6, 2002 8:46 PM by Stephen Coy

    CMR Insert problem

    Atelier-Soft Newbie

      We are using JBoss3.0.0 and MySql 3.2.3 with JBuilder6.0 as the IDE and for integration of JBoss with JBuilder6.0
      we are using JBossOpenTool.jar.
      We are coming accross problems while performing inserts into a CMR field existing between 2 entity beans
      [ProductPurchaseOrder][ProductPurchaseOrderEntry]
      with One-Many Relationship. The following error message gets thrown while performing inserts into the
      2 entity beans:


      14:41:36,533 ERROR [ProductPurchaseOrderEntry] Could not create entity

      java.sql.SQLException: General error: Column 'Product_Purchase_Order_ID' specified twice

      at org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java:498)

      at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(MysqlIO.java:551)

      at org.gjt.mm.mysql.Connection.execSQL(Connection.java:927)

      at org.gjt.mm.mysql.PreparedStatement.executeUpdate(PreparedStatement.java:389)

      at org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.executeUpdate(LocalPreparedStatement.java:308)

      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(JDBCCreateEntityCommand.java:196)

      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:131)

      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:450)

      at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:253)

      14:41:36,613 ERROR [STDERR] javax.ejb.CreateException: Could not create entity:java.sql.SQLException: General error: Column 'Product_Purchase_Order_ID' specified twice

      14:41:36,613 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(JDBCCreateEntityCommand.java:199)

      14:41:36,613 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:131)

      14:41:36,613 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:450)

      14:41:36,754 ERROR [STDERR] at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:253)

      14:41:36,754 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)

      14:41:36,754 ERROR [STDERR] at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:579)

      14:41:36,754 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)

      14:41:36,844 ERROR [STDERR] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1116)

      14:41:36,844 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)

      14:41:36,844 ERROR [STDERR] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:257)

      14:41:37,054 ERROR [STDERR] at $Proxy352.create(Unknown Source)

      14:41:37,054 ERROR [STDERR] at jbossmysql.PurchaseOrderDirectorBean.setProductPurchaseOrderEntryDetails(PurchaseOrderDirectorBean.java:152)

      14:41:37,104 ERROR [STDERR] at jbossmysql.PurchaseOrderDirectorBean.setPurchaseOrder(PurchaseOrderDirectorBean.java:136)

      14:41:37,104 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)

      14:41:37,104 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:664)

      14:41:37,104 ERROR [STDERR] at



      2 tables :
      Product_Purchase_Order
      -------------------------
      Product_Purchase_Order_ID int(11)
      Product_Purchase_Order_Date date
      Vendor_ID int(11)
      Percentage_Advance decimal(9,2)
      Percentage_On_Delivery decimal(9,2)
      Percentage_Credit decimal(9,2)
      Credit_Days int(11)
      CD_Percentage decimal(9,2)
      CD_Days int(11)
      Payment_Terms varchar(128)
      Mode_Of_Payment varchar(32)
      Terms_Of_Delivery varchar(32)
      Type_Of_Shipment varchar(16)
      Shipment_Name varchar(64)
      Discount decimal(9,2)
      Taxes decimal(9,2)
      Product_Purchase_Order_Value decimal(9,2)
      Remarks varchar(255)
      User_ID int(11)
      Authorization_ID int(11)
      Transaction_Status varchar(64)
      Status varchar(32)
      Last_Modified_Date date

      Product_Purchase_Order_Entry
      ------------------------------
      Product_Purchase_Order_ID int(11)
      Product_ID int(11)
      Product_Category_ID int(11)
      Product_Name varchar(64)
      Unit_Price decimal(9,2)
      Quantity_Ordered int(11)
      Discount decimal(9,2)
      Unit_Discounted_Price decimal(9,2)
      Unit_Net_Price decimal(9,2)
      Expected_Delivery_Date date
      Quantity_Received int(11)
      Status varchar(32)


      The ejb-jar.xml file is as follows:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
      <ejb-jar>
      <enterprise-beans>

      <display-name>PurchaseOrderDirector</display-name>
      <ejb-name>PurchaseOrderDirector</ejb-name>
      jbossmysql.PurchaseOrderDirectorHome
      jbossmysql.PurchaseOrderDirector
      <ejb-class>jbossmysql.PurchaseOrderDirectorBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
      <ejb-local-ref>

      <ejb-ref-name>ejb/ProductPurchaseOrder</ejb-ref-name>
      <ejb-ref-type>Entity</ejb-ref-type>
      <local-home>jbossmysql.ProductPurchaseOrderHome</local-home>
      jbossmysql.ProductPurchaseOrder
      <ejb-link>ProductPurchaseOrder</ejb-link>
      </ejb-local-ref>
      <ejb-local-ref>

      <ejb-ref-name>ejb/ProductPurchaseOrderEntry</ejb-ref-name>
      <ejb-ref-type>Entity</ejb-ref-type>
      <local-home>jbossmysql.ProductPurchaseOrderEntryHome</local-home>
      jbossmysql.ProductPurchaseOrderEntry
      <ejb-link>ProductPurchaseOrderEntry</ejb-link>
      </ejb-local-ref>


      <display-name>ProductPurchaseOrder</display-name>
      <ejb-name>ProductPurchaseOrder</ejb-name>
      <local-home>jbossmysql.ProductPurchaseOrderHome</local-home>
      jbossmysql.ProductPurchaseOrder
      <ejb-class>jbossmysql.ProductPurchaseOrderBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Integer</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>ProductPurchaseOrder</abstract-schema-name>
      <cmp-field>
      <field-name>productpurchaseorderid</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>productPurchaseOrderDate</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>vendorid</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>percentageAdvance</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>percentageOnDelivery</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>percentageCredit</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>creditDays</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>cDPercentage</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>cDDays</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>paymentTerms</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>modeOfPayment</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>termsOfDelivery</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>typeOfShipment</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>shipmentName</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>discount</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>taxes</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>productPurchaseOrderValue</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>remarks</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>userid</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>authorizationid</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>transactionStatus</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>status</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>lastModifiedDate</field-name>
      </cmp-field>
      <primkey-field>productpurchaseorderid</primkey-field>


      <display-name>ProductPurchaseOrderEntry</display-name>
      <ejb-name>ProductPurchaseOrderEntry</ejb-name>
      <local-home>jbossmysql.ProductPurchaseOrderEntryHome</local-home>
      jbossmysql.ProductPurchaseOrderEntry
      <ejb-class>jbossmysql.ProductPurchaseOrderEntryBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>jbossmysql.ProductPurchaseOrderEntryPK</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>ProductPurchaseOrderEntry</abstract-schema-name>
      <cmp-field>
      <field-name>productpurchaseorderid</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>productid</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>productcategoryid</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>productName</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>unitPrice</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>quantityOrdered</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>discount</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>unitDiscountedPrice</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>unitNetPrice</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>expectedDeliveryDate</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>quantityReceived</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>status</field-name>
      </cmp-field>

      </enterprise-beans>

      <ejb-relation>
      <ejb-relation-name>productPurchaseOrder-productPurchaseOrderEntry</ejb-relation-name>
      <ejb-relationship-role>
      productPurchaseOrder
      <ejb-relationship-role-name>ProductPurchaseOrderRelationshipRole</ejb-relationship-role-name>
      One
      <relationship-role-source>
      productPurchaseOrder
      <ejb-name>ProductPurchaseOrder</ejb-name>
      </relationship-role-source>
      <cmr-field>
      productPurchaseOrderEntry
      <cmr-field-name>productPurchaseOrderEntry</cmr-field-name>
      <cmr-field-type>java.util.Collection</cmr-field-type>
      </cmr-field>
      </ejb-relationship-role>
      <ejb-relationship-role>
      productPurchaseOrderEntry
      <ejb-relationship-role-name>ProductPurchaseOrderEntryRelationshipRole</ejb-relationship-role-name>
      Many
      <relationship-role-source>
      productPurchaseOrderEntry
      <ejb-name>ProductPurchaseOrderEntry</ejb-name>
      </relationship-role-source>
      </ejb-relationship-role>
      </ejb-relation>

      <assembly-descriptor>
      <container-transaction>

      <ejb-name>ProductPurchaseOrder</ejb-name>
      <method-name>*</method-name>


      <ejb-name>ProductPurchaseOrderEntry</ejb-name>
      <method-name>*</method-name>


      <ejb-name>PurchaseOrderDirector</ejb-name>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      </assembly-descriptor>
      </ejb-jar>


      The jbosscmp-jdbc.xml is as follows:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jbosscmp-jdbc PUBLIC '-//JBoss//DTD JBOSSCMP-JDBC 3.0//EN' 'http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_0.dtd'>
      <jbosscmp-jdbc>


      <enterprise-beans>

      <ejb-name>ProductPurchaseOrder</ejb-name>
      <table-name>product_purchase_order</table-name>
      <cmp-field>
      <field-name>productpurchaseorderid</field-name>
      <column-name>Product_Purchase_Order_ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>productPurchaseOrderDate</field-name>
      <column-name>Product_Purchase_Order_Date</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>vendorid</field-name>
      <column-name>Vendor_ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>percentageAdvance</field-name>
      <column-name>Percentage_Advance</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>percentageOnDelivery</field-name>
      <column-name>Percentage_On_Delivery</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>percentageCredit</field-name>
      <column-name>Percentage_Credit</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>creditDays</field-name>
      <column-name>Credit_Days</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>cDPercentage</field-name>
      <column-name>CD_Percentage</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>cDDays</field-name>
      <column-name>CD_Days</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>paymentTerms</field-name>
      <column-name>Payment_Terms</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>modeOfPayment</field-name>
      <column-name>Mode_Of_Payment</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>termsOfDelivery</field-name>
      <column-name>Terms_Of_Delivery</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>typeOfShipment</field-name>
      <column-name>Type_Of_Shipment</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>shipmentName</field-name>
      <column-name>Shipment_Name</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>discount</field-name>
      <column-name>Discount</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>taxes</field-name>
      <column-name>Taxes</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>productPurchaseOrderValue</field-name>
      <column-name>Product_Purchase_Order_Value</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>remarks</field-name>
      <column-name>Remarks</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>userid</field-name>
      <column-name>User_ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>authorizationid</field-name>
      <column-name>Authorization_ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>transactionStatus</field-name>
      <column-name>Transaction_Status</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>status</field-name>
      <column-name>Status</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>lastModifiedDate</field-name>
      <column-name>Last_Modified_Date</column-name>
      </cmp-field>


      <ejb-name>ProductPurchaseOrderEntry</ejb-name>
      <table-name>product_purchase_order_entry</table-name>
      <cmp-field>
      <field-name>productpurchaseorderid</field-name>
      <column-name>Product_Purchase_Order_ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>productid</field-name>
      <column-name>Product_ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>productcategoryid</field-name>
      <column-name>Product_Category_ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>productName</field-name>
      <column-name>Product_Name</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>unitPrice</field-name>
      <column-name>Unit_Price</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>quantityOrdered</field-name>
      <column-name>Quantity_Ordered</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>discount</field-name>
      <column-name>Discount</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>unitDiscountedPrice</field-name>
      <column-name>Unit_Discounted_Price</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>unitNetPrice</field-name>
      <column-name>Unit_Net_Price</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>expectedDeliveryDate</field-name>
      <column-name>Expected_Delivery_Date</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>quantityReceived</field-name>
      <column-name>Quantity_Received</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>status</field-name>
      <column-name>Status</column-name>
      </cmp-field>

      </enterprise-beans>

      <ejb-relation>
      <ejb-relation-name>productPurchaseOrder-productPurchaseOrderEntry</ejb-relation-name>
      <foreign-key-mapping></foreign-key-mapping>
      <ejb-relationship-role>
      <ejb-relationship-role-name>ProductPurchaseOrderRelationshipRole</ejb-relationship-role-name>
      <key-fields>
      <key-field>
      <field-name>productpurchaseorderid</field-name>
      <column-name>Product_Purchase_Order_ID</column-name>
      </key-field>
      </key-fields>
      </ejb-relationship-role>
      <ejb-relationship-role>
      <ejb-relationship-role-name>ProductPurchaseOrderEntryRelationshipRole</ejb-relationship-role-name>
      </ejb-relationship-role>
      </ejb-relation>

      </jbosscmp-jdbc>

      The ejb-borland.xml is as follows:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC "-//Borland Software Corporation//DTD Enterprise JavaBeans 2.0//EN" "http://www.borland.com/devsupport/appserver/dtds/ejb-jar_2_0-borland.dtd">
      <ejb-jar>
      <enterprise-beans>

      <ejb-name>PurchaseOrderDirector</ejb-name>
      <bean-home-name>PurchaseOrderDirector</bean-home-name>
      <ejb-local-ref>
      <ejb-ref-name>ejb/ProductPurchaseOrder</ejb-ref-name>
      </ejb-local-ref>
      <ejb-local-ref>
      <ejb-ref-name>ejb/ProductPurchaseOrderEntry</ejb-ref-name>
      </ejb-local-ref>


      <ejb-name>ProductPurchaseOrder</ejb-name>
      <bean-local-home-name>ProductPurchaseOrder</bean-local-home-name>
      <cmp2-info>
      <cmp-field>
      <field-name>productpurchaseorderid</field-name>
      <column-name>Product_Purchase_Order_ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>productPurchaseOrderDate</field-name>
      <column-name>Product_Purchase_Order_Date</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>vendorid</field-name>
      <column-name>Vendor_ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>percentageAdvance</field-name>
      <column-name>Percentage_Advance</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>percentageOnDelivery</field-name>
      <column-name>Percentage_On_Delivery</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>percentageCredit</field-name>
      <column-name>Percentage_Credit</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>creditDays</field-name>
      <column-name>Credit_Days</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>cDPercentage</field-name>
      <column-name>CD_Percentage</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>cDDays</field-name>
      <column-name>CD_Days</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>paymentTerms</field-name>
      <column-name>Payment_Terms</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>modeOfPayment</field-name>
      <column-name>Mode_Of_Payment</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>termsOfDelivery</field-name>
      <column-name>Terms_Of_Delivery</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>typeOfShipment</field-name>
      <column-name>Type_Of_Shipment</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>shipmentName</field-name>
      <column-name>Shipment_Name</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>discount</field-name>
      <column-name>Discount</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>taxes</field-name>
      <column-name>Taxes</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>productPurchaseOrderValue</field-name>
      <column-name>Product_Purchase_Order_Value</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>remarks</field-name>
      <column-name>Remarks</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>userid</field-name>
      <column-name>User_ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>authorizationid</field-name>
      <column-name>Authorization_ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>transactionStatus</field-name>
      <column-name>Transaction_Status</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>status</field-name>
      <column-name>Status</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>lastModifiedDate</field-name>
      <column-name>Last_Modified_Date</column-name>
      </cmp-field>
      <table-name>product_purchase_order</table-name>
      </cmp2-info>


      <ejb-name>ProductPurchaseOrderEntry</ejb-name>
      <bean-local-home-name>ProductPurchaseOrderEntry</bean-local-home-name>
      <cmp2-info>
      <cmp-field>
      <field-name>productpurchaseorderid</field-name>
      <column-name>Product_Purchase_Order_ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>productid</field-name>
      <column-name>Product_ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>productcategoryid</field-name>
      <column-name>Product_Category_ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>productName</field-name>
      <column-name>Product_Name</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>unitPrice</field-name>
      <column-name>Unit_Price</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>quantityOrdered</field-name>
      <column-name>Quantity_Ordered</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>discount</field-name>
      <column-name>Discount</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>unitDiscountedPrice</field-name>
      <column-name>Unit_Discounted_Price</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>unitNetPrice</field-name>
      <column-name>Unit_Net_Price</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>expectedDeliveryDate</field-name>
      <column-name>Expected_Delivery_Date</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>quantityReceived</field-name>
      <column-name>Quantity_Received</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>status</field-name>
      <column-name>Status</column-name>
      </cmp-field>
      <table-name>product_purchase_order_entry</table-name>
      </cmp2-info>

      </enterprise-beans>
      <table-properties>
      <table-name>product_purchase_order</table-name>
      <column-properties>
      <column-name>Product_Purchase_Order_ID</column-name>
      </column-properties>
      <column-properties>
      <column-name>Product_Purchase_Order_Date</column-name>
      </column-properties>
      <column-properties>
      <column-name>Vendor_ID</column-name>
      </column-properties>
      <column-properties>
      <column-name>Percentage_Advance</column-name>
      </column-properties>
      <column-properties>
      <column-name>Percentage_On_Delivery</column-name>
      </column-properties>
      <column-properties>
      <column-name>Percentage_Credit</column-name>
      </column-properties>
      <column-properties>
      <column-name>Credit_Days</column-name>
      </column-properties>
      <column-properties>
      <column-name>CD_Percentage</column-name>
      </column-properties>
      <column-properties>
      <column-name>CD_Days</column-name>
      </column-properties>
      <column-properties>
      <column-name>Payment_Terms</column-name>
      </column-properties>
      <column-properties>
      <column-name>Mode_Of_Payment</column-name>
      </column-properties>
      <column-properties>
      <column-name>Terms_Of_Delivery</column-name>
      </column-properties>
      <column-properties>
      <column-name>Type_Of_Shipment</column-name>
      </column-properties>
      <column-properties>
      <column-name>Shipment_Name</column-name>
      </column-properties>
      <column-properties>
      <column-name>Discount</column-name>
      </column-properties>
      <column-properties>
      <column-name>Taxes</column-name>
      </column-properties>
      <column-properties>
      <column-name>Product_Purchase_Order_Value</column-name>
      </column-properties>
      <column-properties>
      <column-name>Remarks</column-name>
      </column-properties>
      <column-properties>
      <column-name>User_ID</column-name>
      </column-properties>
      <column-properties>
      <column-name>Authorization_ID</column-name>
      </column-properties>
      <column-properties>
      <column-name>Transaction_Status</column-name>
      </column-properties>
      <column-properties>
      <column-name>Status</column-name>
      </column-properties>
      <column-properties>
      <column-name>Last_Modified_Date</column-name>
      </column-properties>

      <prop-name>datasource</prop-name>
      <prop-type>String</prop-type>
      <prop-value>serial://datasources/MySqlDS</prop-value>

      </table-properties>
      <table-properties>
      <table-name>product_purchase_order_entry</table-name>
      <column-properties>
      <column-name>Product_Purchase_Order_ID</column-name>
      </column-properties>
      <column-properties>
      <column-name>Product_ID</column-name>
      </column-properties>
      <column-properties>
      <column-name>Product_Category_ID</column-name>
      </column-properties>
      <column-properties>
      <column-name>Product_Name</column-name>
      </column-properties>
      <column-properties>
      <column-name>Unit_Price</column-name>
      </column-properties>
      <column-properties>
      <column-name>Quantity_Ordered</column-name>
      </column-properties>
      <column-properties>
      <column-name>Discount</column-name>
      </column-properties>
      <column-properties>
      <column-name>Unit_Discounted_Price</column-name>
      </column-properties>
      <column-properties>
      <column-name>Unit_Net_Price</column-name>
      </column-properties>
      <column-properties>
      <column-name>Expected_Delivery_Date</column-name>
      </column-properties>
      <column-properties>
      <column-name>Quantity_Received</column-name>
      </column-properties>
      <column-properties>
      <column-name>Status</column-name>
      </column-properties>

      <prop-name>datasource</prop-name>
      <prop-type>String</prop-type>
      <prop-value>serial://datasources/MySqlDS</prop-value>

      </table-properties>

      <ejb-relation>
      <ejb-relationship-role>
      <relationship-role-source>
      <ejb-name>ProductPurchaseOrder</ejb-name>
      </relationship-role-source>
      <cmr-field>
      <cmr-field-name>productPurchaseOrderEntry</cmr-field-name>
      <table-ref>
      <left-table>
      <table-name>product_purchase_order</table-name>
      <column-list>
      <column-name>Product_Purchase_Order_ID</column-name>
      </column-list>
      </left-table>
      <right-table>
      <table-name>product_purchase_order_entry</table-name>
      <column-list>
      <column-name>Product_Purchase_Order_ID</column-name>
      </column-list>
      </right-table>
      </table-ref>
      </cmr-field>
      </ejb-relationship-role>
      <ejb-relationship-role>
      <relationship-role-source>
      <ejb-name>ProductPurchaseOrderEntry</ejb-name>
      </relationship-role-source>
      </ejb-relationship-role>
      </ejb-relation>

      </ejb-jar>