Closed jtsnr closed 4 years ago
@FroMage could you have a look at that one?
@gsmet since Stephane appears to be busy I can take a look at this one
Gladly. @aguibert you need to look at PanacheEntityEnhancer
line 90 in visitEnd
for the field visitor. It adds a @XmlTransient
annotation to the field to force jaxb to use the getter. I guess if we have jaxb annotations we need to move them to the getter perhaps?
Or find a way to make jaxb simply ignore public fields if getters are available, as jsonb does.
Was able to reproduce the issue and pushed a sample here for future reference: https://github.com/aguibert/basic-quarkus/tree/quarkus-6021
I want to include JAXB annotations on my Panache entity so that I can return the entity in XML format in a REST response. Adding
@XmlAttribute
on the public property of the entity causes the REST call to fail with an exception. It is possible to change the access modifier of the property to private to prevent the exception however this approach then loses one of the benefits of Panache.To Reproduce Steps to reproduce the behavior:
Environment: