-
Notifications
You must be signed in to change notification settings - Fork 127
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
Close the loop with relations #311
Comments
In 2.1.1 |
@neumino Could you add this explaination to the documentation w/ an example. Would be very helpful. Thanks. |
The tests have a few examples I'll try to add them on the website. |
|
Added in 2.3.5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thinky was designed to work well with saved relations.
People sometimes just want to just save a relation. This leads to multiple issues like #29, #245, #309 etc.
I'll add a method addRelation and removeRelation that will update only relations. The expectation being that all the documents exists, only the relation is missing.
API:
The last constraint will be for v1 that Query must return a document so the query is probably something like
model.get(<x>)
hasOne
andbelongsTo
,joinedDocument
is not neededhasMany
andhasAndBelongsToMany
, ifjoinedDocument
is not provided, all relations will be removedSame constraint as for addRelation, query must return a document.
The text was updated successfully, but these errors were encountered: