-
Notifications
You must be signed in to change notification settings - Fork 862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Left join with leftJoin(target).on(condition) throwing "Path expected for join!" error #1746
Comments
It should be
You will need to inverse map students in classroom for this |
Ok thanks, it could be a solution but actually I have two constraints:
With that two constraints, is there any possibilities to join my two entities? |
This should also work
|
Please reopen, if still unresolved |
Hi Timo, sorry for reopening this issue, but I have a similar problem and can´t get along with the solutions you described above. My Schema:
Building.class
I try to join from the Campus table to the Building table, but I always get errors I don´t understand. Its absolutely no problem to join from building to campus, but not from campus to building.
Could you please give me a hint what my problem is, or why the reverse join of building->campus isn´t working? Greetz |
My Entity like as under:
getter / setter @entity
}
Exception: |
How are self joins supposed to work then ? There is certainly no relationship defined in this case. |
JPQL is based on properties, so if there isn't a relationship (defined as a property) then you can't really arbitrarily join it. |
if you have something like Class Person {
....
Person twin;
} assuming you're using JPQL query expression QPerson person = QPerson.person;
QPerson twinPerson = new QPerson("twinPerson")
.....
.innerJoin(person.twin, twinPerson) but a relation has to exist on Object level |
Hi,
I want to perform a left join with the
leftJoin(EntityPath<P> target).on(Predicate condition)
notation.This is my entities:
This is an exemple query wich doesn't work:
Here is the error log:
Of course for this exemple I could do something like this:
...but my real query is bigger than this and I cannot begin the query with
query.from(student)
.What I'm doing wrong?
I'm using QueryDsl 3.6.6
The text was updated successfully, but these errors were encountered: