This content has been marked as final. Show 2 replies
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);
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?