forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Panache: do not create findById bridge for abstract entity repositories If the entity type is not fixed in the hierarchy yet, don't generate the bridge Fix quarkusio#5274 * Test for quarkusio#5274: duplicate findById for abstract repositories * Fix quarkusio#5274 for Mongo too * Test for quarkusio#5274 for Mongo
- Loading branch information
Showing
10 changed files
with
114 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...n-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/AbstractRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.quarkus.it.panache; | ||
|
||
import io.quarkus.hibernate.orm.panache.PanacheRepositoryBase; | ||
|
||
public class AbstractRepository<T> implements PanacheRepositoryBase<T, String> { | ||
} |
7 changes: 7 additions & 0 deletions
7
...ts/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Bug5274EntityRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.quarkus.it.panache; | ||
|
||
import javax.enterprise.context.ApplicationScoped; | ||
|
||
@ApplicationScoped | ||
public class Bug5274EntityRepository extends AbstractRepository<Person> { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
.../mongodb-panache/src/main/java/io/quarkus/it/mongodb/panache/bugs/AbstractRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.quarkus.it.mongodb.panache.bugs; | ||
|
||
import io.quarkus.mongodb.panache.PanacheMongoRepositoryBase; | ||
|
||
public class AbstractRepository<T> implements PanacheMongoRepositoryBase<T, String> { | ||
} |
9 changes: 9 additions & 0 deletions
9
...odb-panache/src/main/java/io/quarkus/it/mongodb/panache/bugs/Bug5274EntityRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package io.quarkus.it.mongodb.panache.bugs; | ||
|
||
import javax.enterprise.context.ApplicationScoped; | ||
|
||
import io.quarkus.it.mongodb.panache.book.Book; | ||
|
||
@ApplicationScoped | ||
public class Bug5274EntityRepository extends AbstractRepository<Book> { | ||
} |
24 changes: 24 additions & 0 deletions
24
...n-tests/mongodb-panache/src/main/java/io/quarkus/it/mongodb/panache/bugs/BugResource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package io.quarkus.it.mongodb.panache.bugs; | ||
|
||
import javax.inject.Inject; | ||
import javax.ws.rs.Consumes; | ||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.Produces; | ||
import javax.ws.rs.core.MediaType; | ||
|
||
@Path("/bugs") | ||
@Produces(MediaType.TEXT_PLAIN) | ||
@Consumes(MediaType.TEXT_PLAIN) | ||
public class BugResource { | ||
|
||
@Inject | ||
Bug5274EntityRepository bug5274EntityRepository; | ||
|
||
@GET | ||
@Path("5274") | ||
public String testBug5274() { | ||
bug5274EntityRepository.count(); | ||
return "OK"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters