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
Merge branch 'datacouch_1445_add_n1ql_scope_and_collection_spel' of github.com:spring-projects/spring-data-couchbase into datacouch_1441_consider_scope_and_collection_from_repository_annotation
Copy file name to clipboardExpand all lines: src/main/asciidoc/repository.adoc
+3-1
Original file line number
Diff line number
Diff line change
@@ -133,6 +133,8 @@ A few N1QL-specific values are provided through SpEL:
133
133
- `#n1ql.selectEntity` allows to easily make sure the statement will select all the fields necessary to build the full entity (including document ID and CAS value).
134
134
- `#n1ql.filter` in the WHERE clause adds a criteria matching the entity type with the field that Spring Data uses to store type information.
135
135
- `#n1ql.bucket` will be replaced by the name of the bucket the entity is stored in, escaped in backticks.
136
+
- `#n1ql.scope` will be replaced by the name of the scope the entity is stored in, escaped in backticks.
137
+
- `#n1ql.collection` will be replaced by the name of the collection the entity is stored in, escaped in backticks.
136
138
- `#n1ql.fields` will be replaced by the list of fields (eg. for a SELECT clause) necessary to reconstruct the entity.
137
139
- `#n1ql.delete` will be replaced by the `delete from` statement.
138
140
- `#n1ql.returning` will be replaced by returning clause needed for reconstructing entity.
@@ -164,7 +166,7 @@ This is *NOT* intended for projections to DTOs.
164
166
Another example: +
165
167
`#{#n1ql.selectEntity} WHERE #{#n1ql.filter} AND test = $1` +
166
168
is equivalent to +
167
-
`SELECT #{#n1ql.fields} FROM #{#n1ql.bucket} WHERE #{#n1ql.filter} AND test = $1`
169
+
`SELECT #{#n1ql.fields} FROM #{#n1ql.collection} WHERE #{#n1ql.filter} AND test = $1`
168
170
169
171
.A practical application of SpEL with Spring Security
0 commit comments