dimanche 23 mars 2014

HasMany Association store not keeping totalCount

http://ift.tt/1hbxdhp



As you can see in this fiddle, User Model is having hasMany association with Order Model.

But getTotalCount for order store inside user record always returns 0


Code:



ordersCount = user.orders().getTotalCount();//Line: 49


We can use user.orders().getCount() instead but that count changes with filtering. But we need show both count and totalCount.

Please share the possible workaround.

Thanks.




Aucun commentaire:

Enregistrer un commentaire