From 7ef179bbc664764d7246b49b75b37166e190e2ac Mon Sep 17 00:00:00 2001 From: Icemap Date: Fri, 13 Jan 2023 16:40:54 +0800 Subject: [PATCH] feat: auto_random field isn't copyable --- schema/relationship.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/relationship.go b/schema/relationship.go index 6b019e9e..30f624ef 100644 --- a/schema/relationship.go +++ b/schema/relationship.go @@ -642,7 +642,7 @@ func (rel *Relationship) ToQueryConditions(ctx context.Context, reflectValue ref } 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) { return false }