-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
Issue #1 brought up the issue where an aggregate field might not have a value if no child records exist (e.g. you just deleted the last child record).
The temporary solution to this was to set the aggregate field value to ZERO if no records came back for the aggregate function.
A better solution would be to implement configurable defaults for each aggregate function instead of forcing ZERO if no values come back.
Imagine I was trying to track the AVG of something - I would rather have it come back as NULL if no records exist than to set it as 0 which might imply records exist but just happen to average out to 0 (which might not always be the case).