Skip to content

Commit 1873fbf

Browse files
committed
Update some out of date info on our Join DSL docs
`#[belongs_to]` no longer generates join code, and join methods no longer require `joinable!`
1 parent c6788f1 commit 1873fbf

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

diesel/src/query_dsl/join_dsl.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,12 @@ where
4646

4747
/// Methods allowing various joins between two or more tables.
4848
///
49-
/// Joining between two tables requires a [`#[belongs_to]`
50-
/// association][associations] that defines the relationship.
49+
/// If you have invoked [`joinable!`] for the two tables, you can pass that
50+
/// table directly. Otherwise you will need to use [`.on`] to specify the `ON`
51+
/// clause.
52+
///
53+
/// [`joinable!`]: ../macro.joinable.html
54+
/// [`.on`]: trait.JoinOnDsl.html#method.on
5155
///
5256
/// You can join to as many tables as you'd like in a query, with the
5357
/// restriction that no table can appear in the query more than once. The reason
@@ -114,7 +118,9 @@ impl<T: AsQuery> JoinDsl for T {}
114118

115119
pub trait JoinOnDsl: Sized {
116120
/// Specify the `ON` clause for a join statement. This will override
117-
/// any implicit `ON` clause that would come from `#[belongs_to]`
121+
/// any implicit `ON` clause that would come from [`joinable!`]
122+
///
123+
/// [`joinable!`]: ../macro.joinable.html
118124
///
119125
/// # Example
120126
///

0 commit comments

Comments
 (0)