-
-
Notifications
You must be signed in to change notification settings - Fork 692
Allow to fetch entity and all related ones #486
Copy link
Copy link
Closed
Milestone
Description
Consider the following example (where a release has multiple release_links):
let result = releases::Entity::find()
.find_with_related(release_links::Entity)
.order_by_desc(releases::Column::ReleasedAt)
.all(conn)
.await?;This returns a Vec<(Model, Vec<Model>)>. Changing .all to .one yields a Option<(Model, Option<Model>)>.
For a One-to-Many relation this is really weird, what is expected is Option<(Model, Vec<Model>)>.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done