gotthold
gotthold
PPrisma
Created by gotthold on 5/7/2024 in #help-and-questions
Is it possible to include nested fields in client extensions?
Say i have a a model like this:
model order {
//...
lineItems LineItem[]
}
model order {
//...
lineItems LineItem[]
}
I now want to include a computed field inside order that computes the total over all lineItems. Is this possible directly using the needs field? Currently i am requiring the order to have its id and i then query again for the same order with all lineItems included, just wondering if there is a better way.
4 replies