Code-quality Aggregate GetById default max 1 record

Aggregates & Queries

When creating an aggregate with the PK, please set the Max Records default to 1. 

May sound a bit trivial, and this is just an idea from a code-quality point of view :-) making the developer aware that the property Max records need to have a value. Otherwise you might run into an Unlimited Result-set impacting your application in a negative way.

Created on 19 Mar
Comments (2)

The problem is, when someone then edits that query in a way where it SHOULD return multiple results... and then they don't know/remember to change it... it still works that way.

I think maybe the best way to do this is for the optimizer to silently add it if:

* There are no filter conditions other than the ID

* There is only one Source

If it was done like this, rather than by just automatically setting "Max Records", this would be a great change.


Changed the category to Aggregates & Queries