Community
Participate
Working Groups
There is an inconsistency between xml and json responses for the namedQueryUpdate API. The namedQueryUpdate returns number of records impacted from the update. The JPA-RS wraps this Integer value in a JAXBElement as : JAXBElement jaxbElement = new JAXBElement(new QName("result"), Integer.class, result); The marshaller used to marshall JPA-RS responses has MarshallerProperties.JSON_INCLUDE_ROOT set to false. This causes MOXy to disregard the JAXB Element for JSON, and then it will use "value" because it needs a key (default is "value"). As a result, the XML output will look like <result>25</result> while JSON output is : {"value": 25} The solution is to set the JSON_INCLUDE_ROOT to true for that particular API, so that the output of XML and JSON would consistently use "result".
Setting target and priority. See the following page for the meanings of these fields: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines Community: Please vote for this bug if it is important to you. Votes are one of the main criteria we use to determine which bugs to fix next.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink