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 the $attributes property data is changed and remove model properties and just save the id for use in eager loading
and if the controller code change to something like below and use withCount problem is solved
Discussed in adonisjs/core#3441
Originally posted by farshadfahimi December 25, 2021
I have a simple model like below
and in the controller just fetch the one model from database
the result of
console
in the controller is some thing like belowbut when uncomment
await brand.loadCount('products')
from controller the result oconsole
change toas you can see the
$attributes
property data is changed and remove model properties and just save theid
for use in eager loadingand if the controller code change to something like below and use
withCount
problem is solvedThe text was updated successfully, but these errors were encountered: