We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
queries.MakeStructMapping
boil:",bind"
sqlboiler --version
SQLBoiler v4.10.2
Doesn't matter
type struct JoinStruct { A struct { ColA string `boil:"cola"` ColB string `boil:"colb"` } `boil:",bind" } queries.MakeStructMapping(reflect.TypeOf(JoinStruct{}))
I expect bind mapping to be a map of form {"cola": .., "colb", ...}. But in reality the map is of form {"a.cola": ..., "a.colb"}.
{"cola": .., "colb", ...}
{"a.cola": ..., "a.colb"}
Thus the bug is that boil:",bind" behaves identical to boil:"<fieldname>,bind".
boil:"<fieldname>,bind"
These lines are buggy --
sqlboiler/queries/reflect.go
Lines 395 to 400 in 644d45d
Suggested patch is to replace if len(tag) == 0 if if len(tag) == 0 && !recurse.
if len(tag) == 0
if len(tag) == 0 && !recurse
The text was updated successfully, but these errors were encountered:
If you have identified where the issue is, kindly send in a PR with tests included to prevent a regression.
Sorry, something went wrong.
No branches or pull requests
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: