Skip to content
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

feat: flush with Panache #2899

Merged
merged 3 commits into from
Jun 26, 2019

Conversation

loicmathieu
Copy link
Contributor

@loicmathieu loicmathieu commented Jun 20, 2019

Provide flush method on Panache entity and Panache repository.
Also provide a shorthand method persistAndFlush as it is the most common use case.

I add some documentation to the transaction section of Panache Hibernate.

Fixes #2755

Copy link
Member

@FroMage FroMage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, but it needs some tests to illustrate the use-case by throwing exceptions, I think.

docs/src/main/asciidoc/hibernate-orm-panache-guide.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/hibernate-orm-panache-guide.adoc Outdated Show resolved Hide resolved
@loicmathieu
Copy link
Contributor Author

loicmathieu commented Jun 20, 2019

@FroMage I added an example of persistAndFlush() and I can add more if needed, just tell me

@FroMage
Copy link
Member

FroMage commented Jun 21, 2019

I meant tests, not just docs :)

@loicmathieu
Copy link
Contributor Author

@FroMage just to be clear, there is no /src/test/java directory on the Panache Hibernate extension so by test you mean adding the usage of the flush and persistAndFlush methods on the hibernate-orm-panache integration-test ? And ideally with an exception ?

I will try to do this on Monday.

Provide flush method on Panache entity and Panache repository.
Also provide a shorthand method persistAndFlush as it is the most common use case.
Add integration test for persistAndFliush methods on both PanacheEntity and PanacheRepository.
@loicmathieu
Copy link
Contributor Author

@FroMage I added an integration test for the flushAndPersist() method.

Copy link
Member

@emmanuelbernard emmanuelbernard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment about doc

@emmanuelbernard
Copy link
Member

emmanuelbernard commented Jun 25, 2019 via email

@loicmathieu
Copy link
Contributor Author

@emmanuelbernard @FroMage I updated the documentation part as requested.

@FroMage
Copy link
Member

FroMage commented Jun 25, 2019

Thanks for the test!

Copy link
Member

@FroMage FroMage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small doc tweak requested, but otherwise this is OK to go IMO.

docs/src/main/asciidoc/hibernate-orm-panache-guide.adoc Outdated Show resolved Hide resolved
@FroMage
Copy link
Member

FroMage commented Jun 26, 2019

@emmanuelbernard can you re-review please?

@emmanuelbernard emmanuelbernard merged commit 9e37a44 into quarkusio:master Jun 26, 2019
@emmanuelbernard
Copy link
Member

Thank you @loicmathieu !

@loicmathieu loicmathieu deleted the feat/panache_flush branch June 26, 2019 13:43
@gsmet gsmet added this to the 0.18.0 milestone Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide flush() and persistAndflush() to Panache
4 participants