Comments (3)
I think one of the method used in SQL is more intuitive. When you also can add a CONSTRAINT next to the attribute.
CREATE TABLE example_table (
id INT PRIMARY KEY,
email VARCHAR(100) CONSTRAINT unique_email UNIQUE
);
class User
{
#[ORM\Column(length: 180, unique: true)]
#[ORM\UniqueConstraint(name: 'UNIQ_IDENTIFIER_EMAIL')]
private string $email;
}
from symfony.
class User { #[ORM\Column(length: 180, unique: true)] #[ORM\UniqueConstraint(name: 'UNIQ_IDENTIFIER_EMAIL')] private string $email; }
Then, there's no point to have unique: true
in ORM\Column
from symfony.
You will have to report this feature request to the Doctrine project as that’s where the code for the ORM lives. Closing here therefore. Thank you for understanding.
from symfony.
Related Issues (20)
- Missing translations for Hungarian (hu)
- Missing translations for Indonesian (id)
- Missing translations for Italian (it)
- Missing translations for Latvian (lv) HOT 1
- Missing translations for Lithuanian (lt)
- Missing translations for Polish (pl)
- Missing translations for Russian (ru)
- Missing translations for Spanish (es)
- Missing translations for Ukrainian (uk)
- Missing translations for Dutch (nl)
- [AssetMapper] Add minification since deprecated by cloudflare HOT 2
- [DependencyInjection] Expected scalar, but got ParamConfigurator (or EnvConfigurator) HOT 2
- Symfony Serializer is omitting attributes when using groups HOT 2
- [Mailer] Command mailer:test seting fake 'From' header by default, gives misleading test results HOT 1
- [Mime] Allow custom encoders for parts
- [Serializer] regression with attribute serialization HOT 2
- [AssetMapper] Failed to download the file HOT 2
- [Serializer] `csv_headers` not working as expected HOT 2
- [Validator] CharsetValidator throws TypeError when the value has an invalid charset
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from symfony.