feat: auto_random field isn't copyable

This commit is contained in:
Icemap 2023-01-13 16:40:54 +08:00
parent b087732174
commit 7ef179bbc6

View File

@ -642,7 +642,7 @@ func (rel *Relationship) ToQueryConditions(ctx context.Context, reflectValue ref
} }
func copyableDataType(str DataType) bool { func copyableDataType(str DataType) bool {
for _, s := range []string{"increment", "primary key"} { for _, s := range []string{"auto_increment", "auto_random", "primary key"} {
if strings.Contains(strings.ToLower(string(str)), s) { if strings.Contains(strings.ToLower(string(str)), s) {
return false return false
} }