[FLOW3-general] wrong identifiers in selectboxes after update of flow-2.0.x-dev
Bastian Waidelich
bastian at typo3.org
Tue Apr 2 18:05:33 CEST 2013
Wasko wrote:
Hi Wasko,
> since the last update of flow-2.0.x-dev via composer there is the
> following problem in my selectboxes [...]
> ..
> /**
> * @var integer
> * @ORM\id
> * @ORM\Column(name="idnr")
> * @ORM\Column(type="integer")
> * @ORM\GeneratedValue
> * @ORM\Column(columnDefinition="INT(11) NOT NULL AUTO_INCREMENT
> UNIQUE")
> */
> protected $idnr;
I can reproduce the issue..
Your annotations seem correct (except for the lower-case "i" in
"@ORM\Id", but that should not make a difference).
In fact these annotation should be enough:
/**
* @ORM\Id
* @ORM\GeneratedValue
* @var integer
*/
protected $idnr;
That seems to work and it produces:
CREATE TABLE `my_table_name` (
`idnr` int(11) NOT NULL AUTO_INCREMENT,
...
PRIMARY KEY (`idnr`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
Apparently the issue has been introduced with
https://review.typo3.org/#/c/18954/
If I revert that change (and flush caches) it works again.
But the actual issue is probably, that the "PersistenceMagicAspect"
introduces the "Persistence_Object_Identifier" even if the entity
contains a custom identifier.
--
Bastian Waidelich
--
Core Developer Team
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the FLOW3-general
mailing list