Feature #29547
@identity should make property unique in Database
100%
Description
A Property with the @indentify annotation is currently not unique in the database.
So you could for example add 2 accounts with the same accountIdentifier. That shouldn't work.
Subtasks
Related issues
Updated by Karsten Dambekalns over 9 years ago
- Project changed from TYPO3 Flow Base Distribution to TYPO3.Flow
Updated by Christian Müller almost 9 years ago
- Status changed from New to Accepted
- Assignee changed from Karsten Dambekalns to Christian Müller
- Has patch set to No
Updated by Gerrit Code Review almost 9 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9647
Updated by Gerrit Code Review almost 9 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9647
Updated by Gerrit Code Review almost 9 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9647
Updated by Adrian Föder almost 9 years ago
User Kirab mentioned there were "problems with Resource system"; I assume it's the problem that duplicate \TYPO3\FLOW3\Resource\Resource
records may occur, the identities are the following:
/**
* @var \TYPO3\FLOW3\Resource\ResourcePointer
* @ORM\ManyToOne
* @FLOW3\Identity
*/
protected $resourcePointer;
/**
* @var string
* @FLOW3\Validate(type="StringLength", options={ "maximum"=100 })
* @FLOW3\Identity
*/
protected $filename = '';
/**
* @var string
* @FLOW3\Validate(type="StringLength", options={ "maximum"=100 })
* @FLOW3\Identity
*/
protected $fileExtension = '';
If you upload the exact same file with the same filename, a violation will occur because the same key emerges.
(the ResourcePointer, on the other hand, is intended to be there only once for the same file (content => SHA1).
I would even say the same goes for a Resource: if a Resource has the same filename, extension and ResourcePointer, it is the exact same file and no need for an additional recordset...
If not, or if there should me multiple recordsets for a same file (e.g. for separating ownership etc), the identity must then be a UUID, like usual. I can't see anything more that intrinsically makes a file representation unique than the name, the content and the extension...
Updated by Gerrit Code Review over 8 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9647
Updated by Gerrit Code Review over 8 years ago
Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9647
Updated by Gerrit Code Review over 8 years ago
Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9647
Updated by Karsten Dambekalns over 8 years ago
- Target version set to 1.1
The full stack of changes can be found at https://review.typo3.org/#/q/topic:29547-unique-identity,n,z
Updated by Gerrit Code Review over 8 years ago
Patch set 7 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9647
Updated by Gerrit Code Review over 8 years ago
Patch set 8 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9647
Updated by Gerrit Code Review over 8 years ago
Patch set 9 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9647
Updated by Gerrit Code Review over 8 years ago
Patch set 10 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9647
Updated by Gerrit Code Review over 8 years ago
Patch set 11 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9647
Updated by Gerrit Code Review over 8 years ago
Patch set 12 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9647
Updated by Gerrit Code Review over 8 years ago
Patch set 13 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9647
Updated by Gerrit Code Review over 8 years ago
Patch set 14 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9647
Updated by Gerrit Code Review over 8 years ago
Patch set 15 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9647
Updated by Gerrit Code Review over 8 years ago
Patch set 16 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9647
Updated by Christian Müller over 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset b0fb449cc9dc7266fd027b2c3618041e6fad3ef7.