Commit 8064b21
Fix polymorphic relationship handling in FixtureService
When has_one relationships are configured as arrays (polymorphic relationships),
the code was failing with a fatal error trying to check if the array value existed
as a class configuration.
This fix:
- Checks if relationClassName is an array
- Extracts the 'class' key for polymorphic relationships
- Adds proper warning handling for invalid configurations
- Validates that field_classname_map returns valid class names
Fixes fatal error: DataObject::get() cannot query non-subclass DataObject directly
when processing polymorphic has_one relationships defined as arrays.1 parent 6b7829e commit 8064b21
1 file changed
+27
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
234 | 250 | | |
235 | 251 | | |
236 | 252 | | |
| |||
240 | 256 | | |
241 | 257 | | |
242 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
243 | 270 | | |
244 | 271 | | |
245 | 272 | | |
| |||
0 commit comments