Skip to content
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

many-to-many relation question #162

Open
mueees opened this issue Oct 10, 2014 · 0 comments
Open

many-to-many relation question #162

mueees opened this issue Oct 10, 2014 · 0 comments

Comments

@mueees
Copy link

mueees commented Oct 10, 2014

If i have many-to-many relation, such Task and Tag
and one task has two tags

task.tag.add(tag1)
task.tag.add(tag2);

What is the right way to get task with related tags?

Is it right ?
Task.all().list(function(tasks){
var task = task[0];
task.tag.list(function(tags){
task.tagsData = tags;
})
})

Thanks for answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant