Hello - I have a situation where I have a POJO with 42 attributes however in one part of my application I only need to select 3 of these attributes. A co-worker suggested using a named query to select only the three fields I need. This works fine but an object array is returned with my data. I then need to update the data and then persists it. How do I associate the data returned in the object array to my POJO --> which in turn, is associated to the current session?
Code:
List result = factory.getCurrentSession().getNamedQuery("com.west.mds.caselaw.DocumentFamily.expertInvertigatorFetch").setString("caseUuid", "I5443ba3071ab11d796fabc35f7796f7a").list();
Object[] rs = (Object[]) result.get(0);