I agree with you about detached objects, but my feeling was that with Open Session in View Pattern (which is what I'm using) , the persistence-context (
unit of work) is wrapped by the request-responce cycle (in a
servlet filter) so you application objects never get detached on their own, unless I close the persistence context prematurely. So I'm not sure this is the problem.
The Code for my VisitDAO is
the actual method is from GenericHibernateDAO, which is
The rest of the methods in the DAO are simply database queries.