Register / Login
Win a copy of
Java 9 Revealed
this week in the
Features new in Java 9
this forum made possible by our volunteer staff, including ...
Roel De Nijs
Stephan van Hulst
Object Relational Mapping
Should I use one to many relationship for this case between Cart and Products?
posted 2 years ago
I use one to many relationship for the below case between Cart and Products:
I am implementing a shopping cart where user will add products to his shopping cart.
Also on clicking 'show cart' option the products in the cart will be listed. Which of the following ways should I use:
Do not use any one to many mapping between cart and products table. And on click of 'show cart' button use HQL query such as "from Cart where cart id=
Use one to many mapping between cart and products and get get items using the getCartProducts method?
Boost this thread!
Why doesn't exercise 8-1 from Murach's Java Servlets work for me on IE7?
How To Convert a Servlet File to a JSP File
Unable to redirect the page through dispatcher
Communication between jFrames
Help in HQL