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
import{Contact}from'./contact';
@Entity()exportclassPersonextendsBaseEntity{
@PrimaryGeneratedColumn()id: number;
@Column(_type=>Contact)contact: Contact;// I added the unique: true just for the sake of the example
@Column({default: StatusChoices.PENDING,unique: true})status: StatusChoices;}
No unique constraint is created for the embedded entity field thus I can create 2 persons with the same email. Here are 2 screenshots from phpPgAdmin showing that the unique is created for status but not for contact.email:
The text was updated successfully, but these errors were encountered:
Issue type:
[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[ ]
mysql
/mariadb
[ ]
oracle
[x]
postgres
[ ]
sqlite
[ ]
sqljs
[ ]
react-native
[ ]
expo
TypeORM version:
[x]
latest
[ ]
@next
[ ]
0.x.x
(or put your version here)Steps to reproduce or a small repository showing the problem:
No unique constraint is created for the embedded entity field thus I can create 2 persons with the same email. Here are 2 screenshots from phpPgAdmin showing that the unique is created for
![image](https://user-images.githubusercontent.com/583657/48860721-fb933600-edc1-11e8-87f2-875371fc2dbf.png)
![image](https://user-images.githubusercontent.com/583657/48860731-0221ad80-edc2-11e8-89f2-d7c6c586150c.png)
status
but not forcontact.email
:The text was updated successfully, but these errors were encountered: