I'm relatively new to nHibernate but I've been able to figure out most of the basic mappings for our database.
I'm having trouble figuring out the mapping for this scenario:
Tables:
WebSessions- SessionId
- WebServerSessionId
Carts- CartId
- CartTypeId
- SessionId
PurchaseItemsRFQItemsI know this is not a good design, but at this point, changing it is not an option. A websession has a one-to-many (in reality just one-to-two). Each session has a purchase cart and an rfq cart. Depending on the carttype (purchase,rfq), the cart joins to the PurchaseItems or RFQItems table.
If I wanted to have 2 one-to-one relationships, WebSession-to-Cart (purchase) and WebSession-to-Cart (rfq), is it possible to map this out?
I've thought of using a composite-id for the carts table, basically CartId and CartTypeId but I haven't found many good examples on that approach. Any help is appreciated!