[jboss-user] [EJB 3.0] - Path expected for join!
meselfe
do-not-reply at jboss.com
Wed Nov 8 15:58:16 EST 2006
Why am i getting this exception:
javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.hql.ast.QuerySyntaxException: Path expected for join! [select p from dk.simpletime.model.entity.Project as p join Task as t where p.id = :projectid]
..when performing the query:
String queryStr = "select p from Project as p join Task as t where p.id = :projectid";
Query query = manager.createQuery(queryStr);
query.setParameter("projectid", projectId);
query.setMaxResults(max);
query.setFirstResult(index);
List tasks = query.getResultList();
Theres a @OneToMany relation from Project to Task.
Can any1 help?
Also what would be the query to select all Tasks given a Project?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984315#3984315
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984315
More information about the jboss-user
mailing list