forked from mirror/gorm
Merge pull request #717 from brunoksato/master
Break [] byte, I was breaking another case
This commit is contained in:
commit
1c22149b3c
|
@ -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()))
|
||||||
|
|
Loading…
Reference in New Issue