This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> | |
<class name="Company.Domain.Orders.GiftCard, Company.Domain" table="GiftCards"> | |
<id name="GiftCardId" column="GiftCardId" type="Int32" unsaved-value="0"> | |
<generator class ="native" /> | |
</id> | |
<many-to-one name="Order" column="OrderId" class="Company.Domain.Orders.Order, Company.Domain" not-null="true" /> | |
<property name="PIN" column="PIN" length="4" not-null="true" /> | |
<property name="Number" column="Number" type="string" not-null="true" /> | |
<property name="RedemptionAmount" column="RedemptionAmount" type="Company.Data.MoneyUserType, Company.Data" not-null="true" /> | |
</class> | |
</hibernate-mapping> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> | |
<class name="Company.Domain.Orders.Order, Company.Domain" table="Orders" lazy="true"> | |
<id name="OrderNumber" column="OrderId" type="Int32" unsaved-value="0"> | |
<generator class="native" /> | |
</id> | |
<!-- Some properties removed for brevity --> | |
<bag name="discounts" access="field" cascade="all-delete-orphan" lazy="true" inverse="true"> | |
<key foreign-key="FK_OrderDiscounts_Orders" column="OrderId" /> | |
<one-to-many class="Company.Domain.Orders.Discounts.OrderDiscount, Company.Domain" not-found="ignore" /> | |
</bag> | |
<bag name="giftCards" access="field" cascade="save-update" lazy="true" inverse="true"> | |
<key column ="OrderId" foreign-key="FK_GiftCards_Orders" /> | |
<one-to-many class="Company.Domain.Orders.GiftCard, Company.Domain" /> | |
</bag> | |
<bag name="orderItems" access="field" cascade="all-delete-orphan" lazy="true" inverse="true"> | |
<key column ="OrderId" foreign-key="FK_OrderItems_Orders" /> | |
<one-to-many class="Company.Domain.Cart.CartItem, Company.Domain" /> | |
</bag> | |
<bag name="paymentMethods" access="field" cascade="all-delete-orphan" lazy="true" inverse="true"> | |
<key column="OrderId" foreign-key="FK_PaymentMethods_Orders" /> | |
<one-to-many class="Company.Domain.Orders.Payments.Payment, Company.Domain" /> | |
</bag> | |
</class> | |
</hibernate-mapping> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment