Hi, I would agree with your friend.
Although rendering pages does become easier when using the hibernate proxy object in your managed-beans directly, it could cause problems with being detached from the HibernateSession after the RestoreView phase. ( Even when using the HibernateSessionInView-filter. ) When we switched to 'proper' view-objects and also were able to increase the performance of the application by retrieve all needed properties of an object at once instead of loading them one-by-one. I would never use hibernate proxies again in my managed-beans. With kind regards, Marco Beelen -----Original Message----- From: stormspire [mailto:[EMAIL PROTECTED] Sent: donderdag 18 januari 2007 8:22 To: users@myfaces.apache.org Subject: Hibernate Object and JSF Bean Design Now my JSF managed Bean contains some business object which is hiberante object. My friend told me this design is wrong, he says the managed bean should contain only View Object, and contents of view object is translated from business object. Am I really Wrong? As I use lots of lazy loading from hibernate, so I can directly call object lazily loaded for master and detail example. Any comments? -- View this message in context: http://www.nabble.com/Hibernate-Object-and-JSF-Bean-Design-tf3032608.htm l#a8425940 Sent from the MyFaces - Users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. ------------------------------------------------------------------------------