Fix issue with using UUID primary keys in complex return types
When using a UUID as a primary key with PostgreSQL the grouping was defaulting to the row which caused incorrect results to be returned.
This commit is contained in:
parent
4fb1f52c85
commit
9a3f12ea5f
2 changed files with 151 additions and 1 deletions
|
|
@ -170,7 +170,9 @@ func isSimpleModelType(objType reflect.Type) bool {
|
|||
case reflect.Slice:
|
||||
return objType.Elem().Kind() == reflect.Uint8 //[]byte
|
||||
case reflect.Struct:
|
||||
return objType == timeType || objType == uuidType // time.Time || uuid.UUID
|
||||
return objType == timeType
|
||||
case reflect.Array:
|
||||
return objType == uuidType // uuid.UUID returns reflect.Array kind
|
||||
}
|
||||
|
||||
return false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue