org.hibernate.hql.internal.ast.QuerySyntaxException: Path expected for join! #2079

Open
coder-han opened this Issue Jan 6, 2017 · 0 comments

Projects

None yet

1 participant

@coder-han

User{
@Id
@GeneratedValue
private Integer id;
private String name;
private String passwd;
private String telephone;
}
Profile{
@Id
@GeneratedValue
private Integer id;
private Integer userId;
private String name;
}

JPAQuery query = new JPAQuery(entityManager);
query.from(user).innerJoin(profile).on(user.id.eq(profile.userId));
Object result =  query.createQuery().getResultList();
.QuerySyntaxException: Path expected for join! [select user
from io.kindler.entity.User user
  inner join Profile profile with user.id = profile.userId]] with root cause

org.hibernate.hql.internal.ast.QuerySyntaxException: Path expected for join! [select user
from io.kindler.entity.User user
  inner join Profile profile with user.id = profile.userId]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment