I have the following maps for my intent order To order a basket Iitem.BasketId When I look at SQL I think this is a mapping order. How to define ITem.BasketId in my order map, which is the asset to map against the basket. I think it is the default for the primary key
& Lt; / Id & gt; & Lt; Property name = "basket id" column = "basket_id" type = "int 32" /> & Lt; Set name = "order items" table = "item_backet_content" general = "true" reverse = "true" & gt; & Lt; Major column = "basket_id" /> & Lt; One-to-many classes = "Estor.Daman.Model.Order Itam, Estor.Demen" / & gt; & Lt; / Set & gt; & Lt; / Square & gt;
and orderItem
& lt; Class name = "OrderItem" table = "Item_Basket_Contents" & gt; & Lt; Id name = "id" type = "int32" column = "id" not saved-value = "0" & gt; & Lt; Generator class = "identity" /> & Lt; / Id & gt; & Lt; Property name = "basket id" column = "basket_id" type = "int 32" /> & Lt; / Square & gt;
Use the following:
& lt ; Key Column = "Basket_ID" property-riff = "basket id" />
It is the same.
Comments
Post a Comment