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
Then everything on the server side will work fine, but RestAssured's serialization will always return an empty instance (all fields null).
NOTE: This example is admittedly contrived, but relevant because we have similar code in our integration tests that starts failing because of this bug in another PR of mine (#32876, that PR attempts to make Panache work on private fields as well).
Maybe the serialization that RestAssured relies on does not handle @XmlTransient correctly... Regardless, I think @XmlAccessorType(PROPERTY) would better fit Panache's intent, and may not cause this bug?
I'll try that and send a PR.
The text was updated successfully, but these errors were encountered:
That being said, thinking about this, Panache probably shouldn't try to add or move annotations when the user defines both the field and getter already? I mean if they define it, let them configure it correctly...
Maybe the serialization that RestAssured relies on does not handle @XmlTransient correctly...
I honestly don't know what it uses underneath. I've never used that.
Regardless, I think @XmlAccessorType(PROPERTY) would better fit Panache's intent, and may not cause this bug?
Perhaps? I think we have tests for that, but better make sure we do :)
That being said, thinking about this, Panache probably shouldn't try to add or move annotations when the user defines both the field and getter already? I mean if they define it, let them configure it correctly...
Describe the bug
If I define an entity like so:
And use RestEasy classic with Jackson serialization in my resource:
And try to use RestAssured's serialization in my tests:
Then everything on the server side will work fine, but RestAssured's serialization will always return an empty instance (all fields null).
NOTE: This example is admittedly contrived, but relevant because we have similar code in our integration tests that starts failing because of this bug in another PR of mine (#32876, that PR attempts to make Panache work on private fields as well).
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
See https://github.com/yrodiere/quarkus-playground/tree/panache-xml-transient
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
I have reasons to believe the problem is related to Panache adding
@XmlTransient
automatically to public fields it transforms:Maybe the serialization that RestAssured relies on does not handle
@XmlTransient
correctly... Regardless, I think@XmlAccessorType(PROPERTY)
would better fit Panache's intent, and may not cause this bug?I'll try that and send a PR.
The text was updated successfully, but these errors were encountered: