Closed pennersr closed 6 years ago
FWIW, in order to avoid the issue I was trying out --no-hooks. But, --no-hooks in combination with --no-context gives other errors:
src/.../db/models/auth_user.go:363:29: too many arguments in call to query.Query
have (*queries.Query, boil.Executor)
want (boil.Executor)
src/.../db/models/auth_user.go:447:29: too many arguments in call to query.Query
Here, the trouble line is:
results, err := query.Query(query, e)
Both fixed in v3.0.0-rc7
. Thanks for trying out v3 and reporting bugs! Sorry about the little bumps here :) I was bound to miss a few spots.
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 v3.0.0-rc6
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)
Further information. What did you do, what did you expect?
I am boiling models using aliases, like so:
However, it seems these aliases are not fully picked up. For example, looking at the template, I see:
https://github.com/volatiletech/sqlboiler/blob/v3/templates/09_relationship_to_many_eager.go.tpl#L110
I would have expected to see the use of e.g. DownSingular there, not just singular.
Now, due to my use of the aliases I get compilation errors:
It is undefined, because in the generated files the after select hooks are named according to their aliases: