How to store detached objects in hibernate -
i developing order management application , there different pages complete order. should store full order object in http session or on every page, should retreive object database using cart number or order number?
i know depends on design decisions. looking best practices ppl uses.
thanks in advance help.
yes , no. no not use session (most of time) storing request objects. eat server's ram , depending on how heap memory have left start page i/o. don't know framework using web tier, should using backing objects gets/sets in controller. there can have service tier processing business logic.
and finally, answer question, map data received hibernate entities , if prefer use detached criteria have @ -
http://docs.jboss.org/hibernate/orm/3.5/javadocs/org/hibernate/criterion/detachedcriteria.html
and
https://gist.github.com/jeffsheets/5292986
yes because cart can go in session, there no need persistence until user decides , need maintain throughout browser session.
Comments
Post a Comment