trying to execute this query :
public List<Product> getChildrenById(int id) {
String hql= " FROM Product"
+ " START WITH parent_id = ?"
+ " CONNECT BY NOCYCLE PRIOR id = parent_id"
+ " ORDER SIBLINGS BY id";
return (List<Product>) entityManager.createQuery(hql).setParameter(1, id).getResultList();
}
i got a syntax error:org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: WITH near line 1, column 44 [ FROM com.example.gmao.model.Product START WITH parent_id = ? CONNECT BY NOCYCLE PRIOR id = parent_id ORDER SIBLINGS BY id];
any help? thx