orm icon indicating copy to clipboard operation
orm copied to clipboard

ORM doesn't include into the Schema an Entity without PK that is declared manually 🐛

Open roxblnfk opened this issue 3 years ago • 0 comments

No duplicates 🥲.

  • [X] I have searched for a similar issue in our bug tracker and didn't find any solutions.

What happened?

ORM doesn't include into the Schema an Entity without PK that is declared manually

#[Entity(
    repository: Repository::class,
    table: 'catalog',
)]
// #[PrimaryKey(columns: ['uuid'])] <== doesn't work without PK
#[Behavior\Uuid\Uuid4(field: 'uuid', column: 'uuid')]
#[Behavior\UpdatedAt(field: 'updatedAt', column: 'updated_at')]
#[Behavior\CreatedAt(field: 'createdAt', column: 'created_at')]
class Catalog
{
    public ?string $uuid = null;
    public DateTimeImmutable $updatedAt;
    public DateTimeImmutable $createdAt;
}

Version

ORM 2.1.1
PHP 8.1

roxblnfk avatar Jun 23 '22 13:06 roxblnfk