unique constraint is not created for fields defined in the extended struct. #416

Closed
opened 2016-06-29 02:57:56 +00:00 by ruiyang2015 · 0 comments
ruiyang2015 commented 2016-06-29 02:57:56 +00:00 (Migrated from github.com)

I defined a common base struct for all the common field, with some unique constraint tag, but the

type Base struct {
   Uuid string `xorm:"notnull unique"`
}

type B struct {
   Base `xorm:"extends"`
}

And after engine.Sync2, table does not get unique constrain on the Uuid field.

I defined a common base struct for all the common field, with some unique constraint tag, but the ``` type Base struct { Uuid string `xorm:"notnull unique"` } type B struct { Base `xorm:"extends"` } ``` And after engine.Sync2, table does not get unique constrain on the Uuid field.
lunny referenced this issue from a commit 2020-03-09 02:52:44 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/xorm#416
No description provided.