Skip to main content

IncludeCollection

Trait IncludeCollection 

Source
pub trait IncludeCollection<T>: Entity {
    // Required method
    fn set_included_collection(
        &mut self,
        navigation: &str,
        values: Vec<T>,
    ) -> Result<(), OrmError>;
}
Expand description

Contract generated for entities that can receive an included collection navigation value.

This is used by DbSetQuery::include_many::<T>(...) for has_many navigations. The query layer groups duplicate root rows before assigning the loaded collection.

Required Methods§

Source

fn set_included_collection( &mut self, navigation: &str, values: Vec<T>, ) -> Result<(), OrmError>

Attaches loaded collection values to the field named by navigation.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§