From b27ac1a996240e3246e27d1e03236bad72890f7e Mon Sep 17 00:00:00 2001 From: Bruno Sato Date: Fri, 6 Nov 2015 18:55:56 -0200 Subject: [PATCH] I was breaking another case EncryptedPassword []byte `json:"-" sql:"encrypted_password;not null"` --- postgres.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/postgres.go b/postgres.go index a6d98ae3..373588f1 100644 --- a/postgres.go +++ b/postgres.go @@ -54,10 +54,9 @@ func (postgres) SqlTag(value reflect.Value, size int, autoIncrease bool) string } default: if isByteArrayOrSlice(value) { - if isUUID(value) { - return "uuid" - } return "bytea" + } else if isUUID(value) { + return "uuid" } } panic(fmt.Sprintf("invalid sql type %s (%s) for postgres", value.Type().Name(), value.Kind().String()))