-
Notifications
You must be signed in to change notification settings - Fork 68
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
Heelp!!!! new post not adding to authors #101
Comments
When you save the post do you update the author like this? https://github.com/pouchdb-community/relational-pouch#many-to-one-relationships You can also use |
You do need to supply the author id in the post. Otherwise you cannot ever find the post back to the author. What I normally do is
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
my scheme is the same like the example
[
{singular: 'author', plural: 'authors', relations: { books: {hasMany: 'book'}}},
{singular: 'book', plural: 'books', relations: {author: {belongsTo: 'author'}}}
]
at some point in the app i created an author
db.rel.save('authors', {id: '1', name: 'Administrador', email: 'admin@mail.com', username: 'admin', password: 'xxx'})
like in the real world does not have any Post
when the author add new post does not have the related id
db.rel.find('authors')
but what expected to see
The text was updated successfully, but these errors were encountered: