mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-11 20:00:30 +01:00
Calling QueryAttributes With Aggregate Count On One-To-Many Relationship #284
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @damianstrain on GitHub (Aug 1, 2019).
Hi John,
I'm executing the following (where
"boards"is a one-to-many relationship onProject):Only the following attributes seem to be returned:
"id", "key", "name", "createdOn", "updatedOn"and there are no exceptions or errors present.I know that Project has 2 Boards, so I was expecting
"boardCount"to be 2.Is what I'm doing valid? Can you call
.counton a one-to-many relationship?Many Thanks
@JohnEstropia commented on GitHub (Sep 22, 2019):
@damianstrain Sorry for the long wait. The count operator here is a collection operator, which means it will count a value for a property if you use the
GroupByclause as well. Instead, can you try@damianstrain commented on GitHub (Sep 25, 2019):
Excellent! Thanks @JohnEstropia