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: README.md
+14
Original file line number
Diff line number
Diff line change
@@ -152,6 +152,20 @@ $query->getOneOrNullResult(Query::HYDRATE_OBJECT); // User
152
152
153
153
This is due to the design of the `Query` class preventing from determining the hydration mode used by these functions unless it is specified explicitly during the call.
154
154
155
+
### Problematic approaches
156
+
157
+
Not every QueryBuilder can be statically analysed, here are few advices to maximize type inferring:
158
+
- Do not pass QueryBuilder to methods
159
+
- Do not use dynamic expressions in QueryBuilder methods (mainly in `select`/`join`/`from`/`set`)
160
+
161
+
You can enable reporting of places where inferring is unavailable by:
162
+
163
+
```neon
164
+
parameters:
165
+
doctrine:
166
+
reportDynamicQueryBuilders: true
167
+
```
168
+
155
169
## Custom types
156
170
157
171
If your application uses custom Doctrine types, you can write your own type descriptors to analyse them properly.
0 commit comments