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

Adding joins to relations #18

Open
pnomolos opened this issue Nov 5, 2012 · 4 comments
Open

Adding joins to relations #18

pnomolos opened this issue Nov 5, 2012 · 4 comments

Comments

@pnomolos
Copy link
Collaborator

pnomolos commented Nov 5, 2012

I'd like the ability to add join tables to relation so that you could do things such as ordering by a field on the joined table. What are your thoughts on something like this?

@vlucas
Copy link
Owner

vlucas commented Nov 6, 2012

You know I'm going to ask you for a use case :). I have not needed this myself, so I am especially curious now!

@pnomolos
Copy link
Collaborator Author

pnomolos commented Nov 6, 2012

Sure :)

Devices have and belong to many Categories. Categories belong to Types. Types are ordered. I'd like to order the Categories by the order of whatever Types they're attached to.

@vlucas
Copy link
Owner

vlucas commented Nov 6, 2012

And the categories have no other criteria on which they are ordered? Typically a join table doesn't have any relevant information beyond the foreign key ID's.

@pnomolos
Copy link
Collaborator Author

pnomolos commented Nov 6, 2012

That's correct. The join table is between Devices and Categories - Categories is not a join table and doesn't have any specific order information.

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