mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Remove "not null" validation on HouseholdComposition properties
This change removes the "not null" constraint on specific properties in the HouseholdComposition entity to allow null values. The adjustment addresses Issue #380 and ensures better flexibility without impacting the schema.
This commit is contained in:
parent
50c377ee22
commit
620515ad15
7
.changes/unreleased/Fixed-20250417-105627.yaml
Normal file
7
.changes/unreleased/Fixed-20250417-105627.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
kind: Fixed
|
||||||
|
body: |
|
||||||
|
Remove the "not null" validation constraint on recently added properties on HouseholdComposition
|
||||||
|
time: 2025-04-17T10:56:27.939628281+02:00
|
||||||
|
custom:
|
||||||
|
Issue: "380"
|
||||||
|
SchemaChange: No schema change
|
@ -58,13 +58,11 @@ class HouseholdComposition implements TrackCreationInterface, TrackUpdateInterfa
|
|||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true, options: ['default' => null])]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true, options: ['default' => null])]
|
||||||
private ?int $numberOfChildren = null;
|
private ?int $numberOfChildren = null;
|
||||||
|
|
||||||
#[Assert\NotNull]
|
|
||||||
#[Assert\GreaterThanOrEqual(0, groups: ['Default', 'household_composition'])]
|
#[Assert\GreaterThanOrEqual(0, groups: ['Default', 'household_composition'])]
|
||||||
#[Serializer\Groups(['docgen:read'])]
|
#[Serializer\Groups(['docgen:read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true, options: ['default' => null])]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true, options: ['default' => null])]
|
||||||
private ?int $numberOfDependents = null;
|
private ?int $numberOfDependents = null;
|
||||||
|
|
||||||
#[Assert\NotNull]
|
|
||||||
#[Assert\GreaterThanOrEqual(0, groups: ['Default', 'household_composition'])]
|
#[Assert\GreaterThanOrEqual(0, groups: ['Default', 'household_composition'])]
|
||||||
#[Serializer\Groups(['docgen:read'])]
|
#[Serializer\Groups(['docgen:read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true, options: ['default' => null])]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true, options: ['default' => null])]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user