Replies: 1 comment
-
let record = Entity1::find()
.find_also_related(Entity2)
.filter(entity2::Column::Id.eq(target_id))
.select_only()
- .column(entity1::Column::ColumnToSelect)
+ .column_as(entity1::Column::ColumnToSelect, "A_column_to_select")
.one(&self.connection)
.await?;does something like this work for you?
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm writing code like this:
However, I'm having trouble getting the query to work.
into_tuplemethod onSelectTwoin version 1.1.12, even though a PR implementing it has been merged.into_partial_model, but it requires two type parameters. Besides the struct containing the field I need, I have to define an empty query result.Is there a better way to achieve this?
Beta Was this translation helpful? Give feedback.
All reactions