Skip to main content

Related

Trait Related 

Source
pub trait Related<R>
where R: EntityTrait,
{ // Required method fn to() -> RelationDef; // Provided methods fn via() -> Option<RelationDef> { ... } fn find_related() -> Select<R> { ... } }
Expand description

Self is related to entity R, which lets queries join the two tables without a manual ON clause. For many-to-many relations, override via to point at the junction table.

Required Methods§

Source

fn to() -> RelationDef

The relation from Self to R.

Provided Methods§

Source

fn via() -> Option<RelationDef>

Junction table relation, if Self <-> R is many-to-many.

Build a Select<R> pre-joined with Self via this relation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Related<Entity> for sea_orm::rbac::entity::role_permission::Entity

Available on crate feature rbac only.
Source§

impl Related<Entity> for sea_orm::rbac::entity::role_permission::Entity

Available on crate feature rbac only.
Source§

impl Related<Entity> for sea_orm::rbac::entity::role_permission::Entity

Available on crate feature rbac only.
Source§

impl Related<Entity> for sea_orm::rbac::entity::user_override::Entity

Available on crate feature rbac only.
Source§

impl Related<Entity> for sea_orm::rbac::entity::user_override::Entity

Available on crate feature rbac only.
Source§

impl Related<Entity> for sea_orm::rbac::entity::user_role::Entity

Available on crate feature rbac only.