-
Notifications
You must be signed in to change notification settings - Fork 550
New issue
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
Configuring aliases for relationships for sqlite is not working #1333
Comments
I just read about the alternate syntax in the docs and using |
Sorry about this, I have also been bitten by Viper's lack of case sensitivity.
I don't understand exactly what you mean. As far as I know there is no way to change viper's behaviour, the user can either use the alternative syntax, or we have to entirely replace Viper is SQLBoiler. |
@stephenafamo I mean changing the generated names of foreign keys to lowercase in this line:
|
Okay, that makes sense. Kindly send in a PR and I'll be happy to merge |
Although.... I'm not sure if this should be considered a breaking change since it may break existing configuration. |
Yes, I agree. Viper has an open PR to enable case sensitivity by configuration. It might be better to wait for viper to offer a solution. |
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.15.0
What is your database and version (eg. Postgresql 10)
sqlite3
If this happened at generation time what was the full SQLBoiler command you used to generate your models? (if not applicable leave blank)
sqlboiler sqlite3
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?I included only the relevant part for the aliases, but I can also post the whole thing, if necessary.
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 configuring aliases for a relationship:
I expected my configuration to work, but neither
local
norforeign
are changed in the generated sources.The sqlite3 driver is creating names for each foreign key with an uppercase prefix
FK_
, but viper has no support for case sensitive keys, therefore my aliases are is not applied.The text was updated successfully, but these errors were encountered: