Bug in queries.MakeStructMapping
when boil tag is boil:",bind"
#1315
Labels
queries.MakeStructMapping
when boil tag is boil:",bind"
#1315
What version of SQLBoiler are you using (
sqlboiler --version
)?SQLBoiler v4.10.2
What is your database and version (eg. Postgresql 10)
Doesn't matter
If this happened at runtime what code produced the issue? (if not applicable leave blank)
Further information. What did you do, what did you expect?
I expect bind mapping to be a map of form
{"cola": .., "colb", ...}
.But in reality the map is of form
{"a.cola": ..., "a.colb"}
.Thus the bug is that
boil:",bind"
behaves identical toboil:"<fieldname>,bind"
.How to fix?
These lines are buggy --
sqlboiler/queries/reflect.go
Lines 395 to 400 in 644d45d
Suggested patch is to replace
if len(tag) == 0
ifif len(tag) == 0 && !recurse
.The text was updated successfully, but these errors were encountered: