diff --git a/src/Entity/Attachments/Attachment.php b/src/Entity/Attachments/Attachment.php index f27b0e70..f65ec913 100644 --- a/src/Entity/Attachments/Attachment.php +++ b/src/Entity/Attachments/Attachment.php @@ -97,7 +97,6 @@ abstract class Attachment extends AbstractNamedDBElement */ #[Assert\NotBlank(message: 'validator.attachment.name_not_blank')] #[Groups(['simple', 'extended', 'full'])] - #[ORM\Column(type: Types::STRING)] protected string $name = ''; /** diff --git a/src/Entity/Parts/Part.php b/src/Entity/Parts/Part.php index e425e145..5916569b 100644 --- a/src/Entity/Parts/Part.php +++ b/src/Entity/Parts/Part.php @@ -84,10 +84,10 @@ class Part extends AttachmentContainingDBElement * Overridden properties * (They are defined here and not in a trait, to avoid conflicts). ****************************************************************/ + /** * @var string The name of this part */ - #[ORM\Column(type: Types::STRING)] protected string $name = ''; /** diff --git a/src/Entity/UserSystem/User.php b/src/Entity/UserSystem/User.php index 54d57d7c..b1dc63ad 100644 --- a/src/Entity/UserSystem/User.php +++ b/src/Entity/UserSystem/User.php @@ -69,6 +69,10 @@ use Jbtronics\TFAWebauthn\Model\TwoFactorInterface as WebauthnTwoFactorInterface #[ORM\EntityListeners([TreeCacheInvalidationListener::class])] #[ORM\Table('`users`')] #[ORM\Index(name: 'user_idx_username', columns: ['name'])] +#[ORM\AttributeOverrides([ + new ORM\AttributeOverride(name: 'name', column: new ORM\Column(type: Types::STRING, length: 180, unique: true)) +])] + #[NoLockout()] class User extends AttachmentContainingDBElement implements UserInterface, HasPermissionsInterface, TwoFactorInterface, BackupCodeInterface, TrustedDeviceInterface, WebauthnTwoFactorInterface, PreferredProviderInterface, PasswordAuthenticatedUserInterface, SamlUserInterface @@ -125,11 +129,6 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe #[ORM\Column(type: Types::JSON)] protected ?array $backupCodes = []; - #[ORM\Id] - #[ORM\GeneratedValue] - #[ORM\Column(type: Types::INTEGER)] - protected ?int $id = null; - /** * @var Group|null the group this user belongs to * DO NOT PUT A fetch eager here! Otherwise, you can not unset the group of a user! This seems to be some kind of bug in doctrine. Maybe this is fixed in future versions. @@ -212,7 +211,6 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe #[Assert\NotBlank] #[Assert\Regex('/^[\w\.\+\-\$]+$/', message: 'user.invalid_username')] - #[ORM\Column(type: Types::STRING, length: 180, unique: true)] protected string $name = ''; /**