Jeanne Boyarsky wrote:Is the error occuring on server startup or when you call the code to lookup the DataSource? If the later, are you using "java:comp/env/jdbc/MSSQLDataSource" as the name?
Paul Sturrock wrote:Try changing the fetch mode.
crit = getHbnSession().createCriteria(User2Application.class, "u2a");
crit.add(Restrictions.eq("u2a.application.applicationId", appId));
crit = crit.setProjection(Property.forName("user"));
crit.setFetchMode(FetchMode.JOIN);
crit = crit.createCriteria("user", "u");
Rene Larsen wrote:Have you tried with rs.getTimestamp(1) ??
Mansi Mishra. wrote:
Hanna Habashy wrote:
Mansi Mishra. wrote:Try this...
Can you elaborate on how this code going to return a list of books?
Thanks,
getHibernateTemplate.findByCriteria(criteria).add(Restrictions.eq("category", filterValue))
returns a list of User2Book objects filtered by "category" using the "filterValue"
All you need to do is fetch this into an arraylist of the same type
returns a list of User2Book objects.
Thanks for the response, but my question is how to return a list of books, not a list of User2Book.
Mansi Mishra. wrote:Try this...