Reverse this relation (swap from and to)
(self)
| 214 | impl RelationDef { |
| 215 | /// Reverse this relation (swap from and to) |
| 216 | pub fn rev(self) -> Self { |
| 217 | Self { |
| 218 | rel_type: self.rel_type, |
| 219 | from_tbl: self.to_tbl, |
| 220 | to_tbl: self.from_tbl, |
| 221 | from_col: self.to_col, |
| 222 | to_col: self.from_col, |
| 223 | is_owner: !self.is_owner, |
| 224 | on_delete: self.on_delete, |
| 225 | on_update: self.on_update, |
| 226 | on_condition: self.on_condition, |
| 227 | fk_name: None, |
| 228 | condition_type: self.condition_type, |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | /// Express the relation from a table alias. |
| 233 | /// |
no outgoing calls