Hi Experts,
I'm trying to utilize SUM aggregation on an service entity. It works perfectly fine for getting existing entities. But when i try to create a new entity, it fails (error is in the bottom of the post).
I created a simple example:

and the service:

This is the response when i get existing:


and this is the post request that fails:


It's a requirement to be able to create the header by it self, so deep inserts is not an option. I also know i can just do this in the custom handler as well, but that's what i'm trying to avoid.
Does anyone know if there is a way to fix this?
BR
Mikkel
PS: Sorry about all the images instead of code examples -> Could not get code to format correctly...