Open andrei-dascalu opened 2 years ago
I'll check out the issue with the NO_TESTS
env variable. In the meantime, perhaps you can add the flag --no-tests
whenever you run the command.
For the _id
field. Your best option will be to use an alias. In most cases, a table will not have both id
and _id
and it is better for the user experience if _id
is just id
. Ideally, SQLBoiler will check all other columns and maybe add the suffix instead of the duplication you are facing now.
Since this is a rare scenario that can easily be solved by adding an alias in your config, I doubt if we would change this behaviour.
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 v4.12.0
What is your database and version (eg. Postgresql 10)
mySQL 5.7.33
If this happened at generation time what was the full SQLBoiler command you used to generate your models? (if not applicable leave blank)
sqlboiler mysql
Please provide a relevant database schema so we can replicate your issue (Provided you are comfortable sharing this)
Will work on providing something relevant, if needed
Further information. What did you do, what did you expect?
I have encountered 2 issues:
Although I've tried both with quotes and without quotes,
NO_TESTS
seems to be ignored all the time (all other config work as expected). Tests are always generated.Ok, so there is a field called
_id
which technically is different and has a different name. I'm not sure if this a case that you'd considering handling differently, perhaps via some override parameters or some preset rules on handling potential conflicts. One such way would be to move the stripped character to a suffix (egID_
which is valid)