agrestio / agrest

Server-side Java REST Framework for easy access to data graphs from various backends
https://agrest.io
Apache License 2.0
81 stars 34 forks source link

POST/PUT - can't update multi-key relationships #631

Closed andrus closed 1 year ago

andrus commented 1 year ago

Updating a multi-key relationship results in an exception:

tester.target("/e30")
        .queryParam("include", "e29")
        .post("{\"e29\":{\"db:id1\":11,\"id2prop\":21}}")
        .wasCreated()
io.agrest.jaxrs3.provider.JaxrsAgExceptionMapper - 500 Internal Server Error 
(Exception processing Agrest request) 
[cause: Entity 'E29' has unexpected number of ID attributes: 2]