Struct sea_orm::entity::RelationBuilder
source · pub struct RelationBuilder<E, R>where
E: EntityTrait,
R: EntityTrait,{ /* private fields */ }
Expand description
Defines a helper to build a relation
Implementations§
source§impl<E, R> RelationBuilder<E, R>where
E: EntityTrait,
R: EntityTrait,
impl<E, R> RelationBuilder<E, R>where
E: EntityTrait,
R: EntityTrait,
sourcepub fn from<T>(self, identifier: T) -> Selfwhere
T: IdentityOf<E>,
pub fn from<T>(self, identifier: T) -> Selfwhere
T: IdentityOf<E>,
Build a relationship from an Entity
sourcepub fn to<T>(self, identifier: T) -> Selfwhere
T: IdentityOf<R>,
pub fn to<T>(self, identifier: T) -> Selfwhere
T: IdentityOf<R>,
Build a relationship to an Entity
sourcepub fn on_delete(self, action: ForeignKeyAction) -> Self
pub fn on_delete(self, action: ForeignKeyAction) -> Self
An operation to perform on a foreign key when a delete operation occurs
sourcepub fn on_update(self, action: ForeignKeyAction) -> Self
pub fn on_update(self, action: ForeignKeyAction) -> Self
An operation to perform on a foreign key when an update operation occurs
Trait Implementations§
source§impl<E, R> Debug for RelationBuilder<E, R>where
E: EntityTrait,
R: EntityTrait,
impl<E, R> Debug for RelationBuilder<E, R>where
E: EntityTrait,
R: EntityTrait,
source§impl<E, R> From<RelationBuilder<E, R>> for RelationDefwhere
E: EntityTrait,
R: EntityTrait,
impl<E, R> From<RelationBuilder<E, R>> for RelationDefwhere
E: EntityTrait,
R: EntityTrait,
source§fn from(b: RelationBuilder<E, R>) -> Self
fn from(b: RelationBuilder<E, R>) -> Self
Converts to this type from the input type.