Bug #26542
Autoincrement unique identifiers not working anymore
Status: | Resolved | Start date: | 2011-05-01 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Karsten Dambekalns | % Done: | 100% |
|
Category: | Persistence | |||
Target version: | TYPO3 Flow Base Distribution - 1.0 beta 1 | |||
PHP Version: | Complexity: | |||
Has patch: | Affected Flow version: |
Description
I used the @Id and @GeneratedValue properties as seen in the blog example package to have short urls with integer identifiers like /ticket/234 instead of FLOW3 standard resource identifiers. Unfortunately it dosn't work with relations.
Uncaught Exception in FLOW3 Column name `flow3_persistence_identifier` referenced for relation from F3\Guruhelp\Domain\Model\Message towards F3\Guruhelp\Domain\Model\Ticket does not exist. thrown in file Packages/Framework/FLOW3/Resources/PHP/Doctrine/ORM/Tools/SchemaTool.php in line 485
This is an example model
<?php declare(ENCODING = 'utf-8'); namespace F3\Guruhelp\Domain\Model; /** * @scope prototype * @entity */ class Ticket { /** * @identity * This ID is only for the ORM. * * @var integer * @Id * @GeneratedValue */ protected $id; [...] /** * @var \F3\Guruhelp\Domain\Model\Project * @ManyToOne(inversedBy="tickets") */ protected $project; [...] }
Associated revisions
[FEATURE][BUGFIX] Calculate referenced column names from class code
When no referenced column names are given in a model, determine them by
looking at properties annotated with @Id. If no property is found, then
flow3_persistence_identifier is used, if one property is found, that is
used.
Change-Id: If2a4612a326b6fbdfa4a27363c491723ae5cf1e7
Fixes: #26542
History
#1 Updated by Karsten Dambekalns over 4 years ago
- Status changed from New to Accepted
- Target version set to 1.0 beta 1
Most probably caused the the todo at http://bit.ly/iIPPbR
#2 Updated by Mr. Hudson about 4 years ago
Patch set 1 of change If2a4612a326b6fbdfa4a27363c491723ae5cf1e7 has been pushed to the review server.
It is available at http://review.typo3.org/1959
#3 Updated by Karsten Dambekalns about 4 years ago
- Status changed from Accepted to Under Review
#4 Updated by Karsten Dambekalns about 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100