Closed yassine-y closed 5 years ago
UPDATE: changing the model generated by sqlboiler from Null.Bytes to string makes it work changed:
Image Null.Bytes boil:"image" json:"image,omitempty" toml:"image" yaml:"image,omitempty"
to:
Image string boil:"image" json:"image,omitempty" toml:"image" yaml:"image,omitempty"
Anything that can be done to make this fixed for all schema, without having to change the automatically generated code?
Not for your version, no. In v3 you can use this feature: https://github.com/volatiletech/sqlboiler#types
Though I'm kind of confused why this is a problem. Does mysql seriously not parse blob
into bytes? Or is there some bug with the nullbytes type itself maybe?
I THINK the nativepassword stuff was fixed by this commit btw: 1790a25bc094b44c4c6ba523487592d05b0c890c
Stale.
If you're having a generation problem please answer these questions before submitting your issue. Thanks!
What version of SQLBoiler are you using (
sqlboiler --version
)?SQLBoiler v2.5.0 I modified the core to AllowNativePasswords for MySql.
If this happened at generation time what was the full SQLBoiler command you used to generate your models? (if not applicable leave blank)
If this happened at runtime what code produced the issue? (if not applicable leave blank)
What is the output of the command above with the
-d
flag added to it? (Provided you are comfortable sharing this, it contains a blueprint of your schema)Please provide a relevant database schema so we can replicate your issue (Provided you are comfortable sharing this)
tbh, any table with a blob didn't work so doesn't really matter the schema, I remember I had a similar problem with Php long time ago and I resolved it by using column binding, thus values are bound and one row at a time, but I don't know if that can be done with SQLboiler, or how to get around it in a cleaner way.
Further information. What did you do, what did you expect?
Expected it to return some rows, the table does return all rows if the "photo" column is omitted, while if it's selected or * it returns an empty result set.