Skip to main content

Module select_projection_has_many

Module select_projection_has_many 

Source
Expand description

.select(...) projection through a HasMany relation field.

Field handles for HasMany relations return <Target as Relation>::ManyField<__Origin> (the macro-generated *FieldList struct). An IntoExpr<List<TargetModel>> impl on that struct lets the field handle flow through .select(...) the same way BelongsTo/HasOne handles do; each parent row projects to a list of related rows, and the executor decodes the result as Vec<Vec<Target>>.

Modulesยง

select_has_many_basic
select_has_many_first
select_has_many_with_filter