Hi - I have the usual order/order items object model i.e. the order object contains a Set of items. However, the underlying database is not broken down into order and orderitem tables, instead there is a single orders table that maps orderDates and products directly i.e.:
1 | 1/1/05 | 1 | 4
2 | 1/1/05 | 2 | 6
3 | 1/1/05 | 3 | 4
4 | 2/1/05 | 1 | 7
5 | 2/1/05 | 2 | 1
...
where the first column is id, the second is orderDate, the third is productId and the fourth is quantity.
How do I go about mapping this to my order/orderItem object model?
Hibernate version: 3.0.5
|