Join via [`RelationDef`] with table alias.
(mut self, join: JoinType, mut rel: RelationDef, alias: I)
| 403 | |
| 404 | /// Join via [`RelationDef`] with table alias. |
| 405 | fn join_as<I>(mut self, join: JoinType, mut rel: RelationDef, alias: I) -> Self |
| 406 | where |
| 407 | I: IntoIden, |
| 408 | { |
| 409 | let alias = alias.into_iden(); |
| 410 | rel.to_tbl = rel.to_tbl.alias(SeaRc::clone(&alias)); |
| 411 | self.query().join(join, rel.to_tbl.clone(), rel); |
| 412 | self |
| 413 | } |
| 414 | |
| 415 | /// Join via [`RelationDef`] with table alias but in reverse direction. |
| 416 | /// Assume when there exist a relation A to B. |