You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, all slices and arrays try to scan a postgres array type. That said, kallax should be smart enough to not do that in the case of []byte. In fact, I don't think it makes sense to have a []byte that's not a bytea, since it's being treated right now as a smallint[].
We'll probably special-case []byte to always be bytea and avoid the array scanning.
Kallax seems to throw an error when fetching a model with a field of type
[]byte
, tagged assqltype:"bytea"
:2017/07/28 18:46:45 2 : sql: Scan error on column index 7: kallax: unable to parse array; expected '{' at offset 0
It seems like it's trying to decode the field somehow, instead of blindly copy the byte array.
I'm not sure if this is the correct way of modelling binary blobs. If it's not, some hints on how to do it properly would be appreciated.
The text was updated successfully, but these errors were encountered: