-
Notifications
You must be signed in to change notification settings - Fork 600
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
changes to foreign keys in 4.1 #1459
Comments
you're confusing the annotations. |
So if I did not place this constraint on the Kotlin code, then you could theoretically assign |
Thanks for the pointer to the SQLite docs, I see what you are emulating. The requirement to use nullable variables was a change from the 4.0-beta release, so thanks for the explanation. I guess what I'd hope to see is if a Column is annotated with Overall you have built a great library, this is just one of those edge cases where the DB model isn't perfectly aligned with the object model. |
I wouldn't use |
DBFlow Version: 4.1.0
Issue Kind (Bug, Question, Feature): Question
Please note if you are using Instant Run, there may be bugs where generated classes are not created. Ensure you are using
the apt or kapt plugins and that incremental compilation is off.
Description:
based on your reply to #1344
it appears that it should be possible to set a foreign key as non-nullable in 4.1+. However I continue to get the error
Foreign Keys must be nullable
during compiling.Can you please provide a small code example (in Kotlin) of a foreign-key field set as non-nullable? Do I need to manually create a ForeignKeyReference for every foreign key (from (8) in the changelog to 4.1.0?) And if so, what values do I use for the other 2 fields?
Thank you.
The text was updated successfully, but these errors were encountered: