Skip to Content
0
Jan 27, 2023 at 11:49 AM

Can't create entity while using SUM on entity

192 Views Last edit Jan 27, 2023 at 12:01 PM 18 rev

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:

image.png

and the service:

image.png

This is the response when i get existing:

image.png

image.png

and this is the post request that fails:

image.png

image.png

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...

Attachments

image.png (21.0 kB)
image.png (13.3 kB)
image.png (14.4 kB)
image.png (18.9 kB)
image.png (2.5 kB)
image.png (6.5 kB)