#215 single primary key is always unique

This commit is contained in:
Kononnable 2019-10-29 22:18:35 +01:00
parent bef61595af
commit 35c7e35f74

View File

@ -424,6 +424,12 @@ export default abstract class AbstractDriver {
.forEach(col => {
// eslint-disable-next-line no-param-reassign
col.primary = true;
if (
primaryIndex!.columns.length === 1 &&
col.options.unique
) {
delete col.options.unique;
}
});
if (
!entity.columns.some(v => {