| Total Complexity | 2 | 
| Total Lines | 42 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 10 | final class Options | ||
| 11 | { | ||
| 12 | /** | ||
| 13 | * @readonly | ||
| 14 | * @note will be set to TRUE in the next major version. | ||
| 15 | */ | ||
| 16 | public bool $ignoreUninitializedRelations = true; | ||
| 17 | |||
| 18 | /** | ||
| 19 | * @readonly | ||
| 20 | * @note will be set to TRUE in the next major version. | ||
| 21 | */ | ||
| 22 | public bool $groupByToDeduplicate = false; | ||
| 23 | |||
| 24 | /** | ||
| 25 | * If TRUE, ORM will ignore relations on uninitialized Entity properties. | ||
| 26 | * In this case, `unset($entity->relation)` will not change the relation when saving, | ||
| 27 | * and it will hydrate it if the relation is loaded in the query. | ||
| 28 | * | ||
| 29 | * If FALSE, uninitialized properties will be treated as NULL (an empty collection or empty value). | ||
| 30 | * `unset($entity->relation)` will lead to a change in the relation | ||
| 31 | * (removing the link with another entity or entities). | ||
| 32 | */ | ||
| 33 | public function withIgnoreUninitializedRelations(bool $value): static | ||
| 38 | } | ||
| 39 | |||
| 40 | /** | ||
| 41 | * If TRUE, ORM will use GROUP BY to deduplicate entities in Select queries in cases where | ||
| 42 | * `limit` and `offset` with JOINs are used. | ||
| 43 | * | ||
| 44 | * If FALSE, ORM will not use GROUP BY, which may lead wrong results in cases where | ||
| 45 | * `limit` and `offset` are used with JOINs. | ||
| 46 | */ | ||
| 47 | public function withGroupByToDeduplicate(bool $value): static | ||
| 54 |