in model A, (the one you are using in where clause) , what's the purpose of including model A while you can get the count in B using a where clasue?🤷♂
or what's your end goal with all this extra problems
this should solve your problem this.models.TicketMessages.count(wherre:{'ticketId': ticketId) as model A will have only one unique column(in one hasMany association)
i need this qury to run , not for this situation i have some issue in other places, i wana count model B included in A ..... query.
Обсуждают сегодня