Struct sea_orm::entity::RelationDef [−][src]
pub struct RelationDef {
pub rel_type: RelationType,
pub from_tbl: TableRef,
pub to_tbl: TableRef,
pub from_col: Identity,
pub to_col: Identity,
pub is_owner: bool,
pub on_delete: Option<ForeignKeyAction>,
pub on_update: Option<ForeignKeyAction>,
}
Expand description
Defines a relationship
Fields
rel_type: RelationType
The type of relationship defined in RelationType
from_tbl: TableRef
Reference from another Entity
to_tbl: TableRef
Reference to another ENtity
from_col: Identity
Reference to from a Column
to_col: Identity
Reference to another column
is_owner: bool
Defines the owner of the Relation
on_delete: Option<ForeignKeyAction>
Defines an operation to be performed on a Foreign Key when a
DELETE
Operation is performed
on_update: Option<ForeignKeyAction>
Defines an operation to be performed on a Foreign Key when a
UPDATE
Operation is performed
Implementations
Trait Implementations
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for RelationDef
impl Send for RelationDef
impl Sync for RelationDef
impl Unpin for RelationDef
impl !UnwindSafe for RelationDef
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more