Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upMany-To-Many Joins #398
Comments
This comment has been minimized.
|
Thanks for the issue! This pretty much falls naturally out of the current design once we add composite PK support in general, which is something I'm working on. |
This comment has been minimized.
cbrewster
commented
Dec 27, 2016
|
Hi @sgrif, is there anywhere where I can track the progress of composite PK support? |
This comment has been minimized.
|
A bunch of stuff for composite PKs landed recently, like the annotations in
`table!`. Have a look at the release notes, or the PRs for that if the
macro docs don't include it.
Connor Brewster <notifications@github.com> schrieb am Di. 27. Dez. 2016 um
05:14:
… Hi @sgrif <https://github.com/sgrif>, is there anywhere where I can track
the progress of composite PK support?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#398 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABOX8_cLrKInwL9pZP69z3uh8UrRCETks5rMJCfgaJpZM4JfVsd>
.
|
This comment has been minimized.
cbrewster
commented
Dec 27, 2016
|
@killercup awesome! Is there a recommended way to handle many-to-many yet or is that still in the works? |
This comment has been minimized.
lholden
commented
Jan 4, 2017
•
|
@cbrewster @killercup The composite stuff works... but many to many stuff is still messy by the looks of it. table! {
firsts_seconds (first_id, second_id) {
first_id -> Integer,
second_id -> Integer,
}
}And then I guess you can do a join query on the firsts_seconds and seconds where the first_id matches the id of the first you are starting with. |
rnewman
referenced this issue
Feb 16, 2017
Closed
[query] Add some algebraic interface for generating SQL #273
added a commit
to jnferner/homepage
that referenced
this issue
Mar 31, 2017
This comment has been minimized.
|
Hi everybody ! Is there some news on many-to-many joins ? Therefore I don't know how to represent simple tables joins between Users and Teams (for example). Thanks EDIT: Ooops! It seems the |
Necoro commentedAug 8, 2016
Currently it seems to not be possible to use many-to-many joins in diesel. I was unable to find some out-of-the-box "many-to-many from A to B via cross-table C" -- and for manual implementation (one-to-many from A to C, many-to-one from C to B) support for id-less tables (C obiously has a compound PK) is missing.
Thus, I wanted to open this issue as a reminder (I'm quite astonished that there is none yet :))