You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can save a new website with domains automatically created.
I can update website and domains in the same form too.
The problem is on an update, if we do not send domains in the same order then they have been saved, it will raise an error on the Domain unique constraint.
Example:
Create a new website with 2 domains:
domain[0][name] = domain1.com
domain[1][name] = domain2.com
Save it: OK
Update the website on the same form (changing domain order):
domain[0][name] = newdomain.com
domain[1][name] = domain1.com
Save it: ERROR: Unique constraint on domain name, domain1.com already exist
Update the website on the same form (without changing order):
domain[0][name] = domain1.com
domain[1][name] = newdomain.com
Save it: OK
The text was updated successfully, but these errors were encountered:
For instance, we have 2 entities:
Website
andDomain
.Website
have aOneToMany
relation toDomain
:And
Domain
have a ManyToOne relation and a unique constraint on the domain name field:I have 2 forms:
WebsiteType
andDomainType
.WebsiteType
have a CollectionType of DomainType:I can save a new website with domains automatically created.
I can update website and domains in the same form too.
The problem is on an update, if we do not send domains in the same order then they have been saved, it will raise an error on the
Domain
unique constraint.Example:
Create a new website with 2 domains:
Save it: OK
Update the website on the same form (changing domain order):
Save it: ERROR: Unique constraint on domain name, domain1.com already exist
Update the website on the same form (without changing order):
Save it: OK
The text was updated successfully, but these errors were encountered: