[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Hibernate Oracle Problem: ORA-00907: missing right paren

DeanoUK do-not-reply at jboss.com
Thu Sep 13 07:06:45 EDT 2007


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#4083869

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083869



More information about the jboss-user mailing list