Merge pull request #717 from brunoksato/master

Break [] byte, I was breaking another case
This commit is contained in:
Jinzhu 2015-11-09 09:24:12 +08:00
commit 1c22149b3c
1 changed files with 2 additions and 3 deletions

View File

@ -54,10 +54,9 @@ func (postgres) SqlTag(value reflect.Value, size int, autoIncrease bool) string
} }
default: default:
if isByteArrayOrSlice(value) { if isByteArrayOrSlice(value) {
if isUUID(value) {
return "uuid"
}
return "bytea" return "bytea"
} else if isUUID(value) {
return "uuid"
} }
} }
panic(fmt.Sprintf("invalid sql type %s (%s) for postgres", value.Type().Name(), value.Kind().String())) panic(fmt.Sprintf("invalid sql type %s (%s) for postgres", value.Type().Name(), value.Kind().String()))