You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/query_specs.adoc
+15-1Lines changed: 15 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ https://docs.mongodb.com/manual/tutorial/query-documents/[MongoDB Query Language
8
8
and uses a subset of the language and converts it to Spring Data JPA Specifications under the hood.
9
9
10
10
In this section we will see by example all the supported features started by basic querying to
11
-
comparision operators to joins and other features.
11
+
comparison operators to joins and other features.
12
12
****
13
13
14
14
== Overview
@@ -313,6 +313,20 @@ in such case you can create a database _view_ and map it to an JPA Entity and th
313
313
314
314
TIP: The returned properties are the properties of the primary Entity, which means the `projection` is not supported due to limitation in spring-data-jpa addressed in this https://github.com/mhewedy/spring-data-jpa-mongodb-expressions/issues/4[bug,role=external,window=_blank], until it is fixed and if you need to return properties from other entities involved in the join, you need to follow the database _view_ workaround mentioned in the previous tip.
315
315
316
+
==== Left and right joins
317
+
1. Left join uses notation `.<` and right join uses `.>`, exmaple on left join:
318
+
+
319
+
[source,json]
320
+
----
321
+
include::{jsondir}/testLeftJoin.json[]
322
+
----
323
+
Generated SQL:
324
+
+
325
+
[source,sql]
326
+
----
327
+
... from employee join department on department.id=employee.department_id left join city on city.id=department.city_id where employee.first_name=? or city.name=?
0 commit comments