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
Because we treat the underscore character as a reserved character, we strongly advise following standard Java naming conventions (that is, not using underscores in property names but using camel case instead).
122
+
[NOTE]
123
+
====
124
+
Because we treat underscores (`_`) as a reserved character, we strongly advise to follow standard Java naming conventions (that is, not using underscores in property names but applying camel case instead).
125
+
====
126
+
127
+
[CAUTION]
128
+
====
129
+
.Field Names starting with underscore:
130
+
Field names may start with underscores like `String \_name`.
131
+
Make sure to preserve the `_` as in `\_name` and use double `_` to split nested paths like `user__name`.
132
+
133
+
.Upper Case Field Names:
134
+
Field names that are all uppercase can be used as such.
135
+
Nested paths if applicable require splitting via `_` as in `USER_name`.
136
+
137
+
.Field Names with 2nd uppercase letter:
138
+
Field names that consist of a starting lower case letter followed by an uppercase one like `String qCode` can be resolved by starting with two upper case letters as in `QCode`.
139
+
Please be aware of potential path ambiguities.
140
+
141
+
.Path Ambiguities:
142
+
In the following sample the arrangement of properties `qCode` and `q`, with `q` containing a property called `code`, creates an ambiguity for the path `QCode`.
143
+
```java
144
+
record Container(String qCode, Code q) {}
145
+
record Code(String code) {}
146
+
```
147
+
Since a direct match on a property is considered first, any potential nested paths will not be considered and the algorithm picks the `qCode` field.
148
+
In order to select the `code` field in `q` the underscore notation `Q_Code` is required.
149
+
====
123
150
124
151
[[repositories.collections-and-iterables]]
125
152
== Repository Methods Returning Collections or Iterables
0 commit comments