You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see this only works on an instantiated model. It's not possible to use it in the query builder. This isn't necessarily something we have a problem with, but we'd like to kill all of our n+1 queries.
getProductTypeAttribute has some logic to convert an integer value that's stored with the model, to a class name that's stored elsewhere. This could be an Enum too.
Is there something I can do to make this n+1 proof?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We have the following relationship defined:
As you can see this only works on an instantiated model. It's not possible to use it in the query builder. This isn't necessarily something we have a problem with, but we'd like to kill all of our n+1 queries.
getProductTypeAttribute
has some logic to convert an integer value that's stored with the model, to a class name that's stored elsewhere. This could be an Enum too.Is there something I can do to make this n+1 proof?
Beta Was this translation helpful? Give feedback.
All reactions