MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / rev

Method rev

src/entity/relation.rs:216–230  ·  view source on GitHub ↗

Reverse this relation (swap from and to)

(self)

Source from the content-addressed store, hash-verified

214impl 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 ///

Callers 15

viaMethod · 0.80
viaMethod · 0.80
toMethod · 0.80
viaMethod · 0.80
viaMethod · 0.80
apply_filterMethod · 0.80
find_linkedMethod · 0.80
find_linked_recursiveFunction · 0.80
has_oneMethod · 0.80
has_manyMethod · 0.80
viaMethod · 0.80

Calls

no outgoing calls

Tested by 15

viaMethod · 0.64
viaMethod · 0.64
viaMethod · 0.64
viaMethod · 0.64
viaMethod · 0.64
viaMethod · 0.64
viaMethod · 0.64
viaMethod · 0.64
viaMethod · 0.64
viaMethod · 0.64
viaMethod · 0.64