-
Notifications
You must be signed in to change notification settings - Fork 6
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
Association supported #29
Comments
Two kinds of implementation: Use comment.1Each model should have an association property which at the second position in database:
The type of
Each association value is separated by a space, Use single privatedId with some associations value
|
After discussion, we decide to use association table instead of all foreign key. Separate models and associations. If there is association like this. define :article do
has_many :comments
end
define :comment do
belongs_to :article
end Models defined above will generate an association table called column: privateId, articleId, commentId |
preliminary add association support #29
Supporting all association in SQLite needs too much work, especially when related to the association. The many-to-many relation is hard to implement in the project because it's so complicated and we need to deal with different edge cases.
In order to reduce the complexcity of this lib. We decided to remove the foreign key from the whole project and use binary to store these kinds of relation.
The text was updated successfully, but these errors were encountered: