flow-development-collection
flow-development-collection copied to clipboard
Not possible to name an entity model class "Package"
Description
I am currently upgrade a flow 4.3 application to version 7.2, but i got an error message on cache warmup:
No identifier/primary key specified for Entity "Inwento\InwentoID\Domain\Model\Package\Package".
Every Entity must have an identifier/primary key.
Type: Doctrine\ORM\Mapping\MappingException
File:
Packages/Libraries/doctrine/orm/lib/Doctrine/ORM/Mapping/MappingException.p
hp
Line: 48
if i call the command "./flow flow:doctrine:compileproxies" manually, or rename the class, it works. It looks like Flow 7.2 does not like it if you have a entity class "Package". Or is that intended? With 4.3 I have no problems.
Affected Versions
Neos:
Flow: 7.2
@runner78 How does your model look?
Basically so. I deleted the properties and getter / setter, the original class has about 1000 lines.
<?php
declare(strict_types=1);
namespace Inwento\InwentoID\Domain\Model\Package;
use DateTime;
use DateTimeInterface;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Neos\Flow\Annotations as Flow;
/**
* @Flow\Entity
* @ORM\Table(name="inwento_inwentoid_domain_model_package")
* @package Inwento\InwentoID\Domain\Model\Package
*/
#[Flow\Entity]
#[ORM\Table("inwento_inwentoid_domain_model_package")]
class Package
{
/** elements **/
}