-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix mongodb test #726
Fix mongodb test #726
Conversation
/cc @geoand Fixes the current CI issue for MongoDB with Panache |
Thanks! |
@loicmathieu what change in Quarkus master caused this change? I was just looking into mongodb-panache-quickstart fail. |
@rsvoboda accessors rewritting as exist for Hibernate with Panache has been implemented, so now person.name was rewritten to person.getName() inside the Panache processor and the test fail. |
ok, so https://github.com/quarkusio/quarkus-quickstarts/blob/master/mongodb-panache-quickstart/src/main/java/org/acme/mongodb/panache/Person.java#L23-L25 is called now, instead of getting the direct property value. Should be a note about this change of behavior added into https://github.com/quarkusio/quarkus/wiki/Migration-Guide-1.11? |
@evanchooly the just merged field accessor rewritting you implemented for MongoDB with Panache can cause some bugs on existing code where getters/setters exists but developer still use the field directly. This was the case on the quickstart. As @rsvoboda suggested, maybe it'll be a good idea to add a note about it inside the migration guide for 1.11 |
wouldn't a simple rebuild fix this? I can certainly add a note to that effect but I'm a little surprised it broke a test since rebuilding them should have updated the bytecode accordingly. What did the breakage look like? |
There was a lowercase on the getter, previously it was not used, now it is. |
oh! i see. That entity had hand crafted a getter which was bypassed with field access. Got it. That was the missing piece for me. |
Check list:
Your pull request:
development
branch999-SNAPSHOT
version of Quarkusmvn clean test
)mvn clean package -Pnative
)mvn clean verify -Pnative
)README.md
file (with build and run instructions)pom.xml
andREADME.md