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
In extending protocol of ByteConversion, objects other than strings should not get converted to strings with str function then get the bytes out of those.
In my case, I needed to insert binary data of bytes or bytes-arrays that I get from UUID objects. Data type I set in schema is "binary". Converting bytes to a string actually gives you a string of reference address like "[B@5ee34b1b" which will always get saved as 11 bytes long binary data and the first 3 bytes will always be the same :)
In extending protocol of ByteConversion, objects other than strings should not get converted to strings with str function then get the bytes out of those.
In my case, I needed to insert binary data of bytes or bytes-arrays that I get from UUID objects. Data type I set in schema is "binary". Converting bytes to a string actually gives you a string of reference address like "[B@5ee34b1b" which will always get saved as 11 bytes long binary data and the first 3 bytes will always be the same :)
Quick fix:
Object
#_(to-bytes [o] (to-bytes (str o)))
(to-bytes [o] o))
Thank you for sharing, Ben.
The text was updated successfully, but these errors were encountered: