Bug #37266

Duplicate email address throws exception

Added by Bastian Waidelich about 3 years ago. Updated 5 months ago.

Status:Resolved Start date:2012-05-17
Priority:Must have Due date:
Assigned To:- % Done:

100%

Category:-
Target version:-
Affected Flow version:Git master

Description

Since #29547 is resolved trying to store an email address that already exists throws an exception:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'xyz' for key 'flow3_identity_typo3_party_domain_model_electronicaddress'

The problem is, that it is not possible to find out whether an email exists already except for iterating over all party records.

One solution would be to remove the @FLOW3\Identity annotation from \ TYPO3\Party\Domain\Model\ ElectronicAddress::identifier or to enable property paths ('primaryElectronicAddress.identifier') in QOM somehow.


Related issues

related to TYPO3.Flow - Feature #30933: Check for unique constraints on add() Needs Feedback 2011-10-14
related to TYPO3.Flow - Feature #29547: @identity should make property unique in Database Resolved 2012-04-30

Associated revisions

Revision ed1f4b8b
Added by Bastian Waidelich about 3 years ago

[BUGFIX] Duplicate email address throws exception

Since #29547 is resolved, trying to store an email address that
already exists throws an exception.
This change drops the unique indexes for "identifier", "type" and
"usagetype" from the ElectronicAddress domain model.

Change-Id: I1bf880e2f885318eaf3e9b64d7c3d0d3f094a3ab
Fixes: #37266
Related: #29547
Releases: 1.1, 1.2

Revision 9d10e013
Added by Bastian Waidelich about 3 years ago

[BUGFIX] Duplicate email address throws exception

Since #29547 is resolved, trying to store an email address that
already exists throws an exception.
This change drops the unique indexes for "identifier", "type" and
"usagetype" from the ElectronicAddress domain model.

Change-Id: I5921eb787254935246dc872596b699f8197dae0b
Fixes: #37266
Related: #29547
Releases: 1.1, 1.2

History

#1 Updated by Christian Müller about 3 years ago

At least we should quickly come up with some solution. Removing the annotation is good but then we would have a breaking change if we reintroduce it at some later point... Well maybe that's acceptable, atm the behaviour is broken really.

#2 Updated by Gerrit Code Review about 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11360

#3 Updated by Bastian Waidelich about 3 years ago

Gerrit Code Review wrote:

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11360

This change reverts 38af75b9609c690eedbff6b393cc815e18f79d04 by dropping the unique constraints as discussed in todays scrum meeting

#4 Updated by Gerrit Code Review about 3 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11360

#5 Updated by Gerrit Code Review about 3 years ago

Patch set 1 for branch FLOW3-1.1 has been pushed to the review server.
It is available at http://review.typo3.org/11446

#6 Updated by Bastian Waidelich about 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#7 Updated by Christian Müller 5 months ago

  • Target version deleted (1.1)

Also available in: Atom PDF