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

Can you do two levels of includes? #12

Open
nickretallack opened this issue Jun 18, 2011 · 1 comment
Open

Can you do two levels of includes? #12

nickretallack opened this issue Jun 18, 2011 · 1 comment

Comments

@nickretallack
Copy link

Lets say I'm doing a many through, and I want the results from the join table as well. It could be a many on the first relationship and a one on the second, and result in something like this:

User = {name:'Fred', 'friendships': [{'user':{name:'Bob'}, confirmed:True}, {'user':{name:'George'}, confirmed:False}]}

Given tables like:

create table user (int id primary key, text name)
create table friendship (int sender_id references user, int receiver_id references user, bool confirmed) 
@pifantastic
Copy link
Contributor

I want this feature. Any idea what you think the configuration should look like? For instance, I'm working on a "many" relationship in my branch here: https://github.com/pifantastic/FastLegS/blob/master/test/integration/integration_test.js#L89

However, I'm stuck on what the configuration should be for a "has_many through" relationship.

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

2 participants