-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
@DatabaseField(foreign = true) doesn't generate foreign key constraints #65
Comments
Welcome @RichardForsey89 . I don't quite understand what you are saying. Are you saying that the SQL generated doesn't add in some SQLite specific In the future, be careful of statements like "doesn't work" and be more specific. Thanks. |
Thank you for the quick reply Gray. The generated schema would be missing the Foreign Key constraint, which would then cause issues with INSERTs to Profiles where a child Workspace would be generated, but the child workspace wouldn't have the I admit that I could be incorrect with my expectations/application of ORMlite. Am I to understand that the Also, I'll be more careful of my language in future. |
Supporting perfect schema generation on all of the supported database types is hard. Right now its doesn't setup foreign key constraints unfortunately. I would recommend adding them afterwards by hand. You can use the |
Hi, this is my first git bug report so please bear with me.
For a project I have been trying to use the annotations as per the documentation. However, when I have:
The resulting two tables created have their primary key, and for Workspaces, it will have the profile_id field as NOT NULL, but it won't have the Foreign Key tag set.
The text was updated successfully, but these errors were encountered: