Skip to content

Commit

Permalink
Panache EntityBase should document that it uses the right entity manager
Browse files Browse the repository at this point in the history
Fixes #24394
  • Loading branch information
loicmathieu committed Mar 22, 2022
1 parent 5742fb0 commit 7e7b07f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.quarkus.hibernate.orm.panache.kotlin

import io.quarkus.hibernate.orm.panache.common.runtime.AbstractJpaOperations
import io.quarkus.hibernate.orm.panache.common.runtime.AbstractJpaOperations.implementationInjectionMissing
import io.quarkus.hibernate.orm.panache.kotlin.runtime.KotlinJpaOperations.Companion.INSTANCE
import io.quarkus.panache.common.Parameters
Expand Down Expand Up @@ -86,7 +85,7 @@ interface PanacheRepositoryBase<Entity : Any, Id: Any> {
fun isPersistent(entity: Entity): Boolean = INSTANCE.isPersistent(entity)

/**
* Flushes all pending changes to the database using the default EntityManager.
* Flushes all pending changes to the database using the EntityManager for the <Entity> entity class.
*/
fun flush() {
getEntityManager().flush()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ default boolean isPersistent(Entity entity) {
}

/**
* FFlushes all pending changes to the database using the default EntityManager.
* Flushes all pending changes to the database using the EntityManager for the <Entity> entity class.
*/
default void flush() {
INSTANCE.getEntityManager().flush();
getEntityManager().flush();
}

// Queries
Expand Down

0 comments on commit 7e7b07f

Please sign in to comment.