go-gorm / playground

GORM Playground (Please Create PR for this project to report issues)
MIT License
89 stars 678 forks source link

bug: first argument in the params is not binary #698

Open jhmessina opened 6 months ago

jhmessina commented 6 months ago

Explain your user case and expected results

I'm having an issue in my code when switching to the new gorm.io packages where I pass in a few arguments that are binary, but the first argument is not interpreted that way. I tried to recreate this as best as I could in the playground. This is the output of the query in my actual code with me changing out some variable names for privacy.

SELECT  * FROM objects WHERE  id IN (94,108,231,39,177,211,74,232,190,173,75,172,220,205,107,73,'<binary>','<binary>')  AND  user_id = '<binary>' ;

these should all be seen as <binary>