You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Entity A with ID hidden from the Agrest model, and a special public ID attribute used instead.
Entity B with to-one relationship to A
Issue: how do we update B's "a" value? The following update results in an exception. The error happens even if "B.a" was excluded from the B model via a constraint (I suppose it will not throw if exclusion happens via entity overlay).
PUT {\"a\":val}
Caused by: java.lang.IllegalArgumentException: Entity 'A' has unexpected number of ID attributes: 0
at io.agrest.runtime.protocol.EntityUpdateJsonTraverser.converter(EntityUpdateJsonTraverser.java:158)
at io.agrest.runtime.protocol.EntityUpdateJsonTraverser.processRelationship(EntityUpdateJsonTraverser.java:107)
at io.agrest.runtime.protocol.EntityUpdateJsonTraverser.processObject(EntityUpdateJsonTraverser.java:81)
at io.agrest.runtime.protocol.EntityUpdateJsonTraverser.traverse(EntityUpdateJsonTraverser.java:39)
at io.agrest.runtime.protocol.EntityUpdateParser.parse(EntityUpdateParser.java:45)
at io.agrest.runtime.protocol.EntityUpdateParser.parse(EntityUpdateParser.java:34)
at io.agrest.provider.EntityUpdateReaderProcessor.read(EntityUpdateReaderProcessor.java:24)
at io.agrest.provider.EntityUpdateReader.readFrom(EntityUpdateReader.java:51)
at io.agrest.provider.EntityUpdateReader.readFrom(EntityUpdateReader.java:29)
at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom
The text was updated successfully, but these errors were encountered:
Given:
Issue: how do we update B's "a" value? The following update results in an exception. The error happens even if "B.a" was excluded from the B model via a constraint (I suppose it will not throw if exclusion happens via entity overlay).
The text was updated successfully, but these errors were encountered: