title: JPA issue mapping file issue
body: <p>Getting exception</p>
  
  <p>Internal Exception:
  (1. cvc-complex-type.2.4.a: Invalid content was found starting with element 'entity'. One of '{"<a href="http://java.sun.com/xml/ns/persistence/orm" rel="nofollow">http://java.sun.com/xml/ns/persistence/orm</a>":embeddable
  }' is expected.)
          at oracle.toplink.essentials.exceptions.ValidationException.invalidEntityMappingsDocument(ValidationException.java:1054)
          at oracle.toplink.essentials.internal.ejb.cmp3.xml.XMLHelper.parseDocument(XMLHelper.java:667)
          at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.readExplicitlySpecifiedMappingFiles(MetadataProcessor.java:410)
          at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.readMappingFiles(MetadataProcessor.java:357)
          at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.buildPersistentClassSetFromXMLDocuments(PersistenceUnitProcessor.ja
  va:217)
          at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.buildClassSet(PersistenceUnitProcessor.java:201)
          at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.callPredeploy(JavaSECMPInitializer.java:140)
          at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:239)
          at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:255)
          at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:155)
          ... 10 more
  Caused by:
  (1. cvc-complex-type.2.4.a: Invalid content was found starting with element 'entity'. One of '{"<a href="http://java.sun.com/xml/ns/persistence/orm" rel="nofollow">http://java.sun.com/xml/ns/persistence/orm</a>":embeddable
  }' is expected.)</p>
  
  <pre><code>&lt;entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_1_0.xsd"
  version="1.0"&gt;
  
  &lt;entity class="com.grc.sdb.beans.offer.Offer"&gt;
      &lt;table name="S_OFFERS" /&gt;
      &lt;named-query name="offersByStatus"&gt;
          &lt;query&gt;SELECT o FROM Offer o WHERE o.status=:status&lt;/query&gt;
      &lt;/named-query&gt;
      &lt;named-query name="getAllOffers"&gt;
          &lt;query&gt;SELECT o FROM Offer o ORDER BY o.lastUpdateDate DESC&lt;/query&gt;
      &lt;/named-query&gt;
      &lt;named-query name="getOffersByProductLine"&gt;
          &lt;query&gt;SELECT o FROM Offer o WHERE o.productLineCode =
              :productLineCode AND NOT o.status = :excludeStatus&lt;/query&gt;
      &lt;/named-query&gt;
      &lt;named-query name="getOfferByOfferCode"&gt;
          &lt;query&gt;SELECT o FROM Offer o WHERE o.code = :code&lt;/query&gt;
      &lt;/named-query&gt;
      &lt;entity-listeners&gt;
          &lt;entity-listener class="com.grc.sdb.listener.CodeGeneratorListener"&gt;
              &lt;pre-persist method-name="prePersist" /&gt;
              &lt;pre-update method-name="preUpdate" /&gt;
          &lt;/entity-listener&gt;
          &lt;entity-listener class="com.grc.sdb.listener.BeanChangeActivityListener"&gt;
              &lt;pre-persist method-name="prePersist" /&gt;
              &lt;post-persist method-name="postPersist" /&gt;
              &lt;pre-remove method-name="preRemove" /&gt;
              &lt;pre-update method-name="preUpdate" /&gt;
              &lt;post-update method-name="postUpdate" /&gt;
          &lt;/entity-listener&gt;
      &lt;/entity-listeners&gt;
      &lt;attributes&gt;
          &lt;id name="id"&gt;
              &lt;column name="OFFER_ID" /&gt;
              &lt;generated-value generator="seqOffers" strategy="SEQUENCE" /&gt;
              &lt;sequence-generator name="seqOffers"
                  sequence-name="SEQ_OFFERS" allocation-size="1" /&gt;
          &lt;/id&gt;
          &lt;basic name="code"&gt;
              &lt;column name="OFFER_CODE" /&gt;
          &lt;/basic&gt;
          &lt;basic name="status"&gt;
              &lt;column name="status" /&gt;
          &lt;/basic&gt;
          &lt;basic name="description"&gt;
              &lt;column name="OFFER_DESCRIPTION" /&gt;
          &lt;/basic&gt;
          &lt;basic name="beginDate"&gt;
              &lt;column name="begin_date" /&gt;
              &lt;temporal&gt;DATE&lt;/temporal&gt;
          &lt;/basic&gt;
          &lt;basic name="endDate"&gt;
              &lt;column name="end_date" /&gt;
              &lt;temporal&gt;DATE&lt;/temporal&gt;
          &lt;/basic&gt;
          &lt;basic name="creationDate"&gt;
              &lt;column name="creation_date" /&gt;
              &lt;temporal&gt;TIMESTAMP&lt;/temporal&gt;
          &lt;/basic&gt;
          &lt;basic name="createdBy"&gt;
              &lt;column name="created_by" /&gt;
          &lt;/basic&gt;
          &lt;basic name="currencyCode"&gt;
              &lt;column name="currency_code" /&gt;
          &lt;/basic&gt;
          &lt;basic name="productLineCode"&gt;
              &lt;column name="product_line_code" /&gt;
          &lt;/basic&gt;
          &lt;basic name="clubTypeCode"&gt;
              &lt;column name="club_type_code" /&gt;
          &lt;/basic&gt;
          &lt;basic name="lastUpdatedBy"&gt;
              &lt;column name="last_updated_by" /&gt;
          &lt;/basic&gt;
          &lt;basic name="firstOrderRushAvailableFlag"&gt;
              &lt;column name="FIRST_RUSH_AVAILABLE_FLAG" /&gt;
          &lt;/basic&gt;
          &lt;basic name="firstOrderRushAmount"&gt;
              &lt;column name="FIRST_RUSH_AMOUNT" /&gt;
          &lt;/basic&gt;
          &lt;basic name="firstOrderRushMethod"&gt;
              &lt;column name="FIRST_RUSH_METHOD_CODE" /&gt;
          &lt;/basic&gt;
          &lt;basic name="mpgCode"&gt;
              &lt;column name="MPG_CODE" /&gt;
          &lt;/basic&gt;
          &lt;basic name="contTable"&gt;
              &lt;column name="CONT_TABLE_CODE" /&gt;
          &lt;/basic&gt;
          &lt;basic name="edsKeyCode"&gt;
              &lt;column name="EDS_KEY_CODE" /&gt;
          &lt;/basic&gt;
          &lt;basic name="availableForCanada"&gt;
              &lt;column name="FIRST_CANADA_AVAILABLE_FLAG" /&gt;
          &lt;/basic&gt;
          &lt;basic name="legacyType"&gt;
              &lt;column name="LEGACY_OFFER_TYPE" /&gt;
          &lt;/basic&gt;
          &lt;basic name="continuityKey"&gt;
              &lt;column name="CONTINUITY_KEY" /&gt;
          &lt;/basic&gt;
          &lt;basic name="ffcCode"&gt;
              &lt;column name="FFC_CODE" /&gt;
          &lt;/basic&gt;
          &lt;version name="lastUpdateDate"&gt;
              &lt;column name="LAST_UPDATE_DATE" /&gt;
          &lt;/version&gt;
          &lt;one-to-many name="orderItems" target-entity="com.grc.sdb.beans.offer.OfferItem"
              mapped-by="offer" fetch="LAZY"&gt;
              &lt;join-column name="offer_id" referenced-column-name="offer_id" /&gt;
              &lt;cascade&gt;
                  &lt;cascade-all /&gt;
              &lt;/cascade&gt;
          &lt;/one-to-many&gt;
          &lt;embedded name="firstOrderDetail"&gt;
              &lt;attribute-override name="numPayments"&gt;
                  &lt;column name="FIRST_NUM_PAYMENTS" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="numSHPayments"&gt;
                  &lt;column name="FIRST_SHIP_NUM_PAY" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="firstPaymentAmount"&gt;
                  &lt;column name="FIRST_PAYMENT" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="firstSHAmount"&gt;
                  &lt;column name="FIRST_SHIP_HAND" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="addlPaymentAmount"&gt;
                  &lt;column name="FIRST_ADDL_PAYMENT" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="addlSHAmount"&gt;
                  &lt;column name="FIRST_ADDL_SHIP_HAND" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="canadaSHAmount"&gt;
                  &lt;column name="FIRST_CANADA_SHIP_HAND" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="shipMethod"&gt;
                  &lt;column name="FIRST_SHIP_HAND_METHOD_CODE" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="shipInterval"&gt;
                  &lt;column name="FIRST_CONT_SHIP_INTERVAL" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="payTable"&gt;
                  &lt;column name="FIRST_PAYTABLE" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="billingInterval"&gt;
                  &lt;column name="FIRST_BILLING_INTERVAL" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="totalPaymentAmount"&gt;
                  &lt;column name="FIRST_SHIP_UNIT_PRICE" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="paymentPlanId"&gt;
                  &lt;column name="FIRST_OMX_PLAN_ID" /&gt;
              &lt;/attribute-override&gt;
          &lt;/embedded&gt;
          &lt;embedded name="contOrderDetail"&gt;
              &lt;attribute-override name="numPayments"&gt;
                  &lt;column name="CONT_NUM_PAYMENTS" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="numSHPayments"&gt;
                  &lt;column name="CONT_SHIP_NUM_PAY" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="firstPaymentAmount"&gt;
                  &lt;column name="CONT_FIRST_PAYMENT" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="firstSHAmount"&gt;
                  &lt;column name="CONT_FIRST_SHIP_HAND" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="addlPaymentAmount"&gt;
                  &lt;column name="CONT_ADDL_PAYMENT" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="addlSHAmount"&gt;
                  &lt;column name="CONT_ADDL_SHIP_HAND" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="canadaSHAmount"&gt;
                  &lt;column name="CONT_CANADA_SHIP_HAND" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="shipMethod"&gt;
                  &lt;column name="CONT_SHIP_HAND_METHOD_CODE" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="shipInterval"&gt;
                  &lt;column name="CONT_SHIP_INTERVAL" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="payTable"&gt;
                  &lt;column name="CONT_PAYTABLE" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="billingInterval"&gt;
                  &lt;column name="CONT_BILLING_INTERVAL" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="totalPaymentAmount"&gt;
                  &lt;column name="CONT_SHIP_UNIT_PRICE" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="paymentPlanId"&gt;
                  &lt;column name="CONT_OMX_PLAN_ID" /&gt;
              &lt;/attribute-override&gt;
          &lt;/embedded&gt;
          &lt;transient name="firstOrderItems" /&gt;
          &lt;transient name="contOrderItems" /&gt;
      &lt;/attributes&gt;
  &lt;/entity&gt;
  
  &lt;entity class="com.grc.sdb.beans.offer.OfferItem"&gt;
      &lt;table name="S_OFFER_ITEMS" /&gt;
      &lt;named-query name="removeOfferItems"&gt;
          &lt;query&gt;DELETE FROM OfferItem oi WHERE oi.offer.id=:offer_id&lt;/query&gt;
      &lt;/named-query&gt;
      &lt;named-query name="getOfferItem"&gt;
          &lt;query&gt;SELECT oi FROM OfferItem oi WHERE oi.offer.id=:offer_id AND
              oi.code=:item_code&lt;/query&gt;
      &lt;/named-query&gt;
      &lt;named-query name="getOfferItems"&gt;
          &lt;query&gt;SELECT oi.orderType, oi.code, oi.startCode FROM OfferItem oi
              WHERE oi.offer.id=:offer_id&lt;/query&gt;
      &lt;/named-query&gt;
      &lt;named-query name="getOfferItemsByType"&gt;
          &lt;query&gt;SELECT oi FROM OfferItem oi WHERE oi.offer.id=:offer_id AND
              oi.orderType=:order_type&lt;/query&gt;
      &lt;/named-query&gt;
      &lt;attributes&gt;
          &lt;id name="id"&gt;
              &lt;column name="OFFER_ITEM_ID" /&gt;
              &lt;generated-value generator="seqOfferItemId"
                  strategy="SEQUENCE" /&gt;
              &lt;sequence-generator name="seqOfferItemId"
                  sequence-name="SEQ_OFFER_ITEM_ID" allocation-size="1" /&gt;
          &lt;/id&gt;
          &lt;basic name="offerId"&gt;
              &lt;column name="OFFER_ID" insertable="false" updatable="false" /&gt;
          &lt;/basic&gt;
          &lt;basic name="code"&gt;
              &lt;column name="ITEM_CODE" /&gt;
          &lt;/basic&gt;
          &lt;basic name="orderType"&gt;
              &lt;column name="SHIPMENT_NO" /&gt;
          &lt;/basic&gt;
          &lt;basic name="createdBy"&gt;
              &lt;column name="CREATED_BY" /&gt;
          &lt;/basic&gt;
          &lt;basic name="creationDate"&gt;
              &lt;column name="CREATION_DATE" /&gt;
              &lt;temporal&gt;TIMESTAMP&lt;/temporal&gt;
          &lt;/basic&gt;
          &lt;basic name="lastUpdatedBy"&gt;
              &lt;column name="LAST_UPDATED_BY" /&gt;
          &lt;/basic&gt;
          &lt;basic name="lastUpdateDate"&gt;
              &lt;column name="LAST_UPDATE_DATE" /&gt;
          &lt;/basic&gt;
          &lt;basic name="startCode"&gt;
              &lt;column name="START_ITEM_CODE" /&gt;
          &lt;/basic&gt;
          &lt;basic name="webCartTitle"&gt;
              &lt;column name="WEB_CART_TITLE" /&gt;
          &lt;/basic&gt;
          &lt;basic name="webCartText"&gt;
              &lt;column name="WEB_CART_TEXT" /&gt;
          &lt;/basic&gt;
          &lt;basic name="webCartMaxQty"&gt;
              &lt;column name="WEB_CART_MAX_QTY" /&gt;
          &lt;/basic&gt;
  
          &lt;many-to-one name="offer"&gt;
              &lt;join-column name="OFFER_ID" nullable="false"
                  insertable="true" updatable="true" /&gt;
          &lt;/many-to-one&gt;
          &lt;transient name="description" /&gt;
          &lt;transient name="sequenceNumber" /&gt;
          &lt;transient name="webCartTextOverridden" /&gt;
          &lt;transient name="resetWebCartText" /&gt;
          &lt;transient name="webCartTextUpdated" /&gt;
  
      &lt;/attributes&gt;
  &lt;/entity&gt;
  
  &lt;entity class="com.grc.sdb.beans.offer.Item"&gt;
      &lt;table name="S_ITEMS" /&gt;
      &lt;named-query name="getItemByCode"&gt;
          &lt;query&gt;SELECT i FROM Item i WHERE i.status=:status AND
              i.orgCode=:org_code AND i.code=:code&lt;/query&gt;
      &lt;/named-query&gt;
      &lt;named-query name="getItemByCodeAnyStatus"&gt;
          &lt;query&gt;SELECT i FROM Item i WHERE i.orgCode=:org_code AND
              UPPER(i.code)=:code&lt;/query&gt;
      &lt;/named-query&gt;
      &lt;named-query name="searchItemsForProductLineByCode"&gt;
          &lt;query&gt;SELECT i FROM Item i WHERE i.status=:status AND
              i.orgCode=:org_code AND i.productLineCode=:product_line_code AND
              UPPER(i.code) LIKE :code_filter ORDER BY i.code&lt;/query&gt;
      &lt;/named-query&gt;
      &lt;named-query name="searchItemsForContinuity"&gt;
          &lt;!-- not checking for status because we want any the Item related to the 
              Continuity even if Inactive --&gt;
          &lt;query&gt;
              SELECT i FROM Item i WHERE i.orgCode=:org_code
              AND i.code IN
              (SELECT coi.contItemCode FROM ContinuityItem coi WHERE
              coi.continuityKey=:continuityKey)
          &lt;/query&gt;
      &lt;/named-query&gt;
      &lt;named-query name="countItemsForProductLineByCode"&gt;
          &lt;query&gt;SELECT COUNT(i) FROM Item i WHERE i.status=:status AND
              i.orgCode=:org_code AND i.productLineCode=:product_line_code AND
              UPPER(i.code) LIKE :code_filter&lt;/query&gt;
      &lt;/named-query&gt;
      &lt;attributes&gt;
          &lt;id name="code"&gt;
              &lt;column name="item_code" /&gt;
          &lt;/id&gt;
          &lt;basic name="description"&gt;
              &lt;column name="item_description" /&gt;
          &lt;/basic&gt;
          &lt;basic name="productLineCode"&gt;
              &lt;column name="product_line_code" /&gt;
          &lt;/basic&gt;
          &lt;basic name="orgCode"&gt;
              &lt;column name="org_code" /&gt;
          &lt;/basic&gt;
          &lt;basic name="company"&gt;
              &lt;column name="company" /&gt;
          &lt;/basic&gt;
          &lt;basic name="edsProductNumber"&gt;
              &lt;column name="eds_product_no" /&gt;
          &lt;/basic&gt;
          &lt;basic name="status"&gt;
              &lt;column name="item_status" /&gt;
          &lt;/basic&gt;
          &lt;basic name="invOrg"&gt;
              &lt;column name="inv_org" /&gt;
          &lt;/basic&gt;
          &lt;basic name="invSeq"&gt;
              &lt;column name="inv_seq" /&gt;
          &lt;/basic&gt;
          &lt;basic name="opUnit"&gt;
              &lt;column name="op_unit" /&gt;
          &lt;/basic&gt;
          &lt;basic name="sequenceNumber"&gt;
              &lt;column name="SEQ_NUM" /&gt;
          &lt;/basic&gt;
          &lt;basic name="mnShippingStatusCode"&gt;
              &lt;column name="MN_SHIP_STATUS_CODE" /&gt;
          &lt;/basic&gt;
          &lt;basic name="mnShippingReadinessFlag"&gt;
              &lt;column name="MN_SHIP_READINESS_FLAG" /&gt;
              &lt;enumerated&gt;STRING&lt;/enumerated&gt;
          &lt;/basic&gt;
          &lt;basic name="supplySize"&gt;
              &lt;column name="SUPPLY_SIZE" /&gt;
          &lt;/basic&gt;
          &lt;basic name="productDescription1"&gt;
              &lt;column name="PRODUCT_DESCRIPTION_1" /&gt;
          &lt;/basic&gt;
      &lt;/attributes&gt;
  &lt;/entity&gt;
  
  &lt;entity class="com.grc.sdb.beans.payment.PaymentPlan"&gt;
      &lt;table name="S_OMX_PAYMENT_PLANS" /&gt;
      &lt;attributes&gt;
          &lt;id name="id"&gt;
              &lt;column name="OMX_PLAN_ID" /&gt;
              &lt;generated-value generator="seqPlanId" strategy="SEQUENCE" /&gt;
              &lt;sequence-generator name="seqPlanId"
                  sequence-name="SEQ_OMX_PLAN_ID" allocation-size="1" /&gt;
          &lt;/id&gt;
          &lt;basic name="cID"&gt;
              &lt;column name="CID" /&gt;
          &lt;/basic&gt;
          &lt;basic name="planID"&gt;
              &lt;column name="PLAN_ID" /&gt;
          &lt;/basic&gt;
          &lt;basic name="description"&gt;
              &lt;column name="PLAN_DESCRIPTION" /&gt;
          &lt;/basic&gt;
          &lt;basic name="paymentPlanType"&gt;
              &lt;column name="PAYMENT_PLAN_TYPE" /&gt;
          &lt;/basic&gt;
          &lt;basic name="recurrenceXML"&gt;
              &lt;column name="RECURRENCE_XML" /&gt;
          &lt;/basic&gt;
          &lt;basic name="createdBy"&gt;
              &lt;column name="CREATED_BY" /&gt;
          &lt;/basic&gt;
          &lt;basic name="creationDate"&gt;
              &lt;column name="CREATION_DATE" /&gt;
              &lt;temporal&gt;TIMESTAMP&lt;/temporal&gt;
          &lt;/basic&gt;
          &lt;basic name="lastUpdatedBy"&gt;
              &lt;column name="LAST_UPDATED_BY" /&gt;
          &lt;/basic&gt;
          &lt;basic name="lastUpdateDate"&gt;
              &lt;column name="LAST_UPDATE_DATE" /&gt;
          &lt;/basic&gt;
          &lt;one-to-many name="paymentPlanDetails"
              target-entity="com.grc.sdb.beans.payment.PaymentPlanDetail"
              mapped-by="paymentPlan" fetch="EAGER"&gt;
              &lt;join-column name="OMX_PLAN_ID" referenced-column-name="OMX_PLAN_ID" /&gt;
              &lt;cascade&gt;
                  &lt;cascade-all /&gt;
              &lt;/cascade&gt;
          &lt;/one-to-many&gt;
      &lt;/attributes&gt;
  &lt;/entity&gt;
  
  &lt;entity class="com.grc.sdb.beans.payment.PaymentPlanDetail"&gt;
      &lt;table name="S_OMX_PAYMENT_PLAN_DETAILS" /&gt;
      &lt;attributes&gt;
          &lt;id name="id"&gt;
              &lt;column name="OMX_PLAN_DETAIL_ID" /&gt;
              &lt;generated-value generator="seqPlanDetailId"
                  strategy="SEQUENCE" /&gt;
              &lt;sequence-generator name="seqPlanDetailId"
                  sequence-name="SEQ_OMX_PLAN_DETAIL_ID" allocation-size="1" /&gt;
          &lt;/id&gt;
          &lt;basic name="planID"&gt;
              &lt;column name="OMX_PLAN_ID" /&gt;
          &lt;/basic&gt;
          &lt;basic name="paymentID"&gt;
              &lt;column name="PAYMENT_ID" /&gt;
          &lt;/basic&gt;
          &lt;basic name="delayInDays"&gt;
              &lt;column name="DELAY_IN_DAYS" /&gt;
          &lt;/basic&gt;
          &lt;basic name="fraction"&gt;
              &lt;column name="FRACTION" /&gt;
          &lt;/basic&gt;
          &lt;basic name="includeSH"&gt;
              &lt;column name="INCLUDE_SH" /&gt;
          &lt;/basic&gt;
          &lt;basic name="includeTax"&gt;
              &lt;column name="INCLUDE_TAX" /&gt;
          &lt;/basic&gt;
          &lt;basic name="includeNonPrimaryProduct"&gt;
              &lt;column name="INCLUDE_NON_PRIMARY_PRODUCT" /&gt;
          &lt;/basic&gt;
          &lt;basic name="fixedPaymentAmount"&gt;
              &lt;column name="FIXED_PAYMENT_AMOUNT" /&gt;
          &lt;/basic&gt;
          &lt;basic name="createdBy"&gt;
              &lt;column name="CREATED_BY" /&gt;
          &lt;/basic&gt;
          &lt;basic name="creationDate"&gt;
              &lt;column name="CREATION_DATE" /&gt;
              &lt;temporal&gt;TIMESTAMP&lt;/temporal&gt;
          &lt;/basic&gt;
          &lt;basic name="lastUpdatedBy"&gt;
              &lt;column name="LAST_UPDATED_BY" /&gt;
          &lt;/basic&gt;
          &lt;basic name="lastUpdateDate"&gt;
              &lt;column name="LAST_UPDATE_DATE" /&gt;
          &lt;/basic&gt;
          &lt;many-to-one name="paymentPlan"&gt;
              &lt;join-column name="OMX_PLAN_ID" nullable="false"
                  insertable="false" updatable="false" /&gt;
              &lt;cascade&gt;
                  &lt;cascade-all /&gt;
              &lt;/cascade&gt;
          &lt;/many-to-one&gt;
      &lt;/attributes&gt;
  &lt;/entity&gt;
  
  &lt;entity class="com.grc.sdb.beans.offer.Continuity"&gt;
      &lt;table name="S_CONTINUITIES" /&gt;
      &lt;named-query name="getAllContinuityOrders"&gt;
          &lt;query&gt;SELECT co FROM Continuity co ORDER BY co.lastUpdateDate DESC,
              co.code ASC&lt;/query&gt;
      &lt;/named-query&gt;
      &lt;attributes&gt;
          &lt;id name="key"&gt;
              &lt;column name="continuity_key" /&gt;
              &lt;generated-value generator="seqContinuities"
                  strategy="SEQUENCE" /&gt;
              &lt;sequence-generator name="seqContinuities"
                  sequence-name="SEQ_CONTINUITY_KEY" allocation-size="1" /&gt;
          &lt;/id&gt;
          &lt;basic name="code"&gt;
              &lt;column name="continuity_code" /&gt;
          &lt;/basic&gt;
          &lt;basic name="mpgCode"&gt;
              &lt;column name="mpg_code" /&gt;
          &lt;/basic&gt;
          &lt;basic name="creationDate"&gt;
              &lt;column name="creation_date" /&gt;
              &lt;temporal&gt;TIMESTAMP&lt;/temporal&gt;
          &lt;/basic&gt;
          &lt;basic name="createdBy"&gt;
              &lt;column name="created_by" /&gt;
          &lt;/basic&gt;
          &lt;basic name="lastUpdatedBy"&gt;
              &lt;column name="last_updated_by" /&gt;
          &lt;/basic&gt;
          &lt;basic name="productLineCode"&gt;
              &lt;column name="product_line_code" /&gt;
          &lt;/basic&gt;
          &lt;basic name="ffcCode"&gt;
              &lt;column name="ffc_code" /&gt;
          &lt;/basic&gt;
          &lt;basic name="firstToContShipInterval"&gt;
              &lt;column name="FIRST_CONT_SHIP_INTERVAL" /&gt;
          &lt;/basic&gt;
          &lt;version name="lastUpdateDate"&gt;
              &lt;column name="LAST_UPDATE_DATE" /&gt;
          &lt;/version&gt;
  
          &lt;one-to-many name="items"
              target-entity="com.grc.sdb.beans.offer.ContinuityItem" mapped-by="continuity"
              fetch="LAZY"&gt;
              &lt;order-by&gt;sequenceNumber ASC&lt;/order-by&gt;
              &lt;join-column name="continuity_key"
                  referenced-column-name="continuity_key" /&gt;
              &lt;cascade&gt;
                  &lt;cascade-all /&gt;
              &lt;/cascade&gt;
          &lt;/one-to-many&gt;
          &lt;embedded name="detail"&gt;
              &lt;attribute-override name="numPayments"&gt;
                  &lt;column name="NUM_PAYMENTS" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="numSHPayments"&gt;
                  &lt;column name="SHIP_NUM_PAY" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="firstPaymentAmount"&gt;
                  &lt;column name="FIRST_PAYMENT" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="firstSHAmount"&gt;
                  &lt;column name="FIRST_SHIP_HAND" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="addlPaymentAmount"&gt;
                  &lt;column name="ADDL_PAYMENT" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="addlSHAmount"&gt;
                  &lt;column name="ADDL_SHIP_HAND" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="canadaSHAmount"&gt;
                  &lt;column name="CANADA_SHIP_HAND" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="shipMethod"&gt;
                  &lt;column name="SHIP_HAND_METHOD_CODE" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="shipInterval"&gt;
                  &lt;column name="SHIP_INTERVAL" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="payTable"&gt;
                  &lt;column name="PAYTABLE" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="billingInterval"&gt;
                  &lt;column name="BILLING_INTERVAL" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="totalPaymentAmount"&gt;
                  &lt;column name="UNIT_PRICE" /&gt;
              &lt;/attribute-override&gt;
              &lt;attribute-override name="paymentPlanId"&gt;
                  &lt;column name="CONT_OMX_PLAN_ID" /&gt;
              &lt;/attribute-override&gt;
          &lt;/embedded&gt;
      &lt;/attributes&gt;
  &lt;/entity&gt;
  
  &lt;entity class="com.grc.sdb.beans.offer.ContinuityItem"&gt;
      &lt;table name="S_ITEM_CONTINUITIES" /&gt;
      &lt;attributes&gt;
          &lt;id name="continuityKey"&gt;
              &lt;column name="continuity_key" insertable="false" updatable="false" /&gt;
          &lt;/id&gt;
          &lt;id name="contItemCode"&gt;
              &lt;column name="cont_item_code" /&gt;
          &lt;/id&gt;
          &lt;id name="startItemCode"&gt;
              &lt;column name="start_item_code" /&gt;
          &lt;/id&gt;
          &lt;id name="sequenceNumber"&gt;
              &lt;column name="SEQ_NUM" /&gt;
          &lt;/id&gt;
          &lt;basic name="omxSOCId"&gt;
              &lt;column name="OMX_SOC_ID" /&gt;
          &lt;/basic&gt;
          &lt;basic name="itemContinuityCode"&gt;
              &lt;column name="item_continuity_code" /&gt;
          &lt;/basic&gt;
          &lt;basic name="creationDate"&gt;
              &lt;column name="creation_date" /&gt;
              &lt;temporal&gt;TIMESTAMP&lt;/temporal&gt;
          &lt;/basic&gt;
          &lt;basic name="createdBy"&gt;
              &lt;column name="created_by" /&gt;
          &lt;/basic&gt;
          &lt;basic name="lastUpdatedBy"&gt;
              &lt;column name="last_updated_by" /&gt;
          &lt;/basic&gt;
          &lt;basic name="productLineCode"&gt;
              &lt;column name="product_line_code" /&gt;
          &lt;/basic&gt;
          &lt;basic name="ffcCode"&gt;
              &lt;column name="ffc_code" /&gt;
          &lt;/basic&gt;
          &lt;version name="lastUpdateDate"&gt;
              &lt;column name="LAST_UPDATE_DATE" /&gt;
          &lt;/version&gt;
          &lt;many-to-one name="continuity"&gt;
              &lt;join-column name="continuity_key" nullable="false"
                  insertable="true" updatable="true" /&gt;
          &lt;/many-to-one&gt;
          &lt;one-to-one name="backendOffer"&gt;
              &lt;join-column name="BACKEND_OFFER_ID" nullable="false"
                  insertable="true" updatable="true" /&gt;
              &lt;cascade&gt;
                  &lt;cascade-all /&gt;
              &lt;/cascade&gt;      
          &lt;/one-to-one&gt;
      &lt;/attributes&gt;
  &lt;/entity&gt;
  
  &lt;entity class="com.grc.sdb.beans.offer.Soc"&gt;
      &lt;table name="S_OMX_SOC" /&gt;
      &lt;attributes&gt;
          &lt;id name="id"&gt;
              &lt;column name="OMX_SOC_ID" /&gt;
              &lt;generated-value generator="sequenceSocId" strategy="SEQUENCE" /&gt;
              &lt;sequence-generator name="seqSocId"
                  sequence-name="SEQ_OMX_SOC_ID" allocation-size="1" /&gt;
          &lt;/id&gt;
          &lt;basic name="cid"&gt;
              &lt;column name="CID" /&gt;
          &lt;/basic&gt;
          &lt;basic name="config"&gt;
              &lt;column name="CONFIGURATION_ID" /&gt;
          &lt;/basic&gt;
          &lt;basic name="description"&gt;
              &lt;column name="SOC_DESCRIPTION" /&gt;
          &lt;/basic&gt;
          &lt;basic name="recurrencePattern"&gt;
              &lt;column name="OMX_RECURRENCE_PATTERN_ID" /&gt;
          &lt;/basic&gt;
          &lt;basic name="itemCode"&gt;
              &lt;column name="ITEM_CODE" /&gt;
          &lt;/basic&gt;
          &lt;basic name="discountPercentage"&gt;
              &lt;column name="DISCOUNT_PERCENT" /&gt;
          &lt;/basic&gt;
          &lt;basic name="discountAmount"&gt;
              &lt;column name="DISCOUNT_AMOUNT" /&gt;
          &lt;/basic&gt;
          &lt;basic name="noBackorderFlag"&gt;
              &lt;column name="NO_BACKORDER_FLAG" /&gt;
          &lt;/basic&gt;
          &lt;basic name="active"&gt;
              &lt;column name="ACTIVE" /&gt;
          &lt;/basic&gt;
          &lt;basic name="creationDate"&gt;
              &lt;column name="CREATION_DATE" /&gt;
              &lt;temporal&gt;TIMESTAMP&lt;/temporal&gt;
          &lt;/basic&gt;
          &lt;basic name="createdBy"&gt;
              &lt;column name="CREATED_BY" /&gt;
          &lt;/basic&gt;
          &lt;basic name="lastUpdatedBy"&gt;
              &lt;column name="LAST_UPDATED_BY" /&gt;
          &lt;/basic&gt;
          &lt;basic name="lastUpdateDate"&gt;
              &lt;column name="LAST_UPDATE_DATE" /&gt;
          &lt;/basic&gt;
      &lt;/attributes&gt;
  &lt;/entity&gt;
  
  &lt;embeddable class="com.grc.sdb.beans.offer.OrderDetail"&gt;
      &lt;attributes&gt;
          &lt;basic name="numPayments" /&gt;
          &lt;basic name="numSHPayments" /&gt;
          &lt;basic name="firstPaymentAmount" /&gt;
          &lt;basic name="firstSHAmount" /&gt;
          &lt;basic name="addlPaymentAmount" /&gt;
          &lt;basic name="addlSHAmount" /&gt;
          &lt;basic name="canadaSHAmount" /&gt;
          &lt;basic name="shipMethod" /&gt;
          &lt;basic name="shipInterval" /&gt;
          &lt;basic name="payTable" /&gt;
          &lt;basic name="billingInterval" /&gt;
          &lt;basic name="totalPaymentAmount" /&gt;
          &lt;basic name="paymentPlanId" /&gt;
      &lt;/attributes&gt;
  &lt;/embeddable&gt;
  
  &lt;entity class="com.grc.sdb.beans.offer.BackendOffer"&gt;
      &lt;table name="S_BACKEND_OFFERS" /&gt;
      &lt;attributes&gt;
          &lt;id name="backendOfferID"&gt;
              &lt;column name="BACKEND_OFFER_ID" /&gt;
              &lt;generated-value generator="seqBackendOffers"
                  strategy="SEQUENCE" /&gt;
              &lt;sequence-generator name="seqBackendOffers"
                  sequence-name="seq_backend_offer_id" allocation-size="1" /&gt;
          &lt;/id&gt;           
          &lt;basic name="backendOfferCode"&gt;
              &lt;column name="backend_Offer_Code" /&gt;
          &lt;/basic&gt;
          &lt;basic name="backendOfferDescription"&gt;
              &lt;column name="backend_Offer_Description" /&gt;
          &lt;/basic&gt;
          &lt;basic name="creationDate"&gt;
              &lt;column name="creation_date" /&gt;
              &lt;temporal&gt;TIMESTAMP&lt;/temporal&gt;
          &lt;/basic&gt;
          &lt;basic name="createdBy"&gt;
              &lt;column name="created_by" /&gt;
          &lt;/basic&gt;
          &lt;basic name="lastUpdatedBy"&gt;
              &lt;column name="last_updated_by" /&gt;
          &lt;/basic&gt;
          &lt;version name="lastUpdateDate"&gt;
              &lt;column name="LAST_UPDATE_DATE" /&gt;
          &lt;/version&gt;
          &lt;one-to-one name="continuityItem"&gt;
              &lt;join-column name="continuity_key"  nullable="false" insertable="true" updatable="true"/&gt;
              &lt;cascade&gt;
                  &lt;cascade-refresh /&gt;
              &lt;/cascade&gt;
          &lt;/one-to-one&gt;           
      &lt;/attributes&gt;
  &lt;/entity&gt;
  &lt;/entity-mappings&gt;
  </code></pre>