Just to let you know the query...
I have two tables.
Users and UserSurveys
There is a one-to-many mapping between
Users to UserSurveys.
I'm trying to perform a query like to get users who haven't completed a survey
before 'purchaseDate':
Query query = entityManager.createQuery("FROM " + User.class.getSimpleName()
+ " cu LEFT JOIN FETCH cu.userSurveys us"
+ " WHERE cu.purchaseDate <= :purchaseDate");
query.setParameter("purchaseDate", new java.sql.Date(cal.getTimeInMillis()),
TemporalType.DATE);
That's it.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083869#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...