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

Data data-tx if hibernate-jpa #2173

Merged
merged 3 commits into from
Nov 15, 2023
Merged

Data data-tx if hibernate-jpa #2173

merged 3 commits into from
Nov 15, 2023

Conversation

sdelamo
Copy link
Contributor

@sdelamo sdelamo commented Nov 11, 2023

This PR adds the io.micronaut.data:micronaut-data-tx-hibernate if the feature hibernate-jpa is selected:

see: micronaut-projects/micronaut-guides#1369

from Micronaut SQL user guide:

Hibernate, you will need to add the hibernate-jpa dependency to your build configuration:
implementation("io.micronaut.sql:micronaut-hibernate-jpa")
and the Micronaut Data Transaction Hibernate dependency:
implementation("io.micronaut.data:micronaut-data-tx-hibernate")

@sdelamo sdelamo added the type: improvement A minor improvement to an existing feature label Nov 11, 2023
@sdelamo sdelamo requested a review from dstepanov November 11, 2023 18:03
@sdelamo sdelamo requested a review from melix November 15, 2023 10:29
@sdelamo
Copy link
Contributor Author

sdelamo commented Nov 15, 2023

@melix @dstepanov I added support for the ignoredAutomaticDependencies extension.

@sdelamo sdelamo merged commit 8cf2aff into 4.2.x Nov 15, 2023
12 checks passed
@sdelamo sdelamo deleted the hibernate-jpa branch November 15, 2023 13:13
private Set<String> ignoredAutomaticDependencies(GeneratorContext generatorContext) {
if (generatorContext.hasDependency(MicronautDependencyUtils.GROUP_ID_MICRONAUT_DATA, MicronautDependencyUtils.ARTIFACT_ID_MICRONAUT_DATA_TX_HIBERNATE)
&& generatorContext.countDependencies(MicronautDependencyUtils.GROUP_ID_MICRONAUT_DATA) == 1) {
return Set.of(MicronautDependencyUtils.GROUP_ID_MICRONAUT_DATA + ":" + ARTIFACT_ID_MICRONAUT_DATA_PROCESSOR_ARTIFACT);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is breaking the hibernate-jpa guide for gradle micronaut-projects/micronaut-guides#1369

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement A minor improvement to an existing feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants