Skip to content

Commit

Permalink
fixed JPA
Browse files Browse the repository at this point in the history
  • Loading branch information
faermanj committed Aug 3, 2022
1 parent ad6ebc7 commit c82b8d9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/on-release-tag.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
name: Build a new release from tag
name: Build a new release

on:
workflow_dispatch: {}
push:
tags:
- 'v*'
- '*'

env:
REF_NAME: ${{ github.ref_name }}
GRAALVM_VERSION: '22.0.0.2'
GRAALVM_JAVA: 'java17'
GRAALVM_ARCH: 'amd64'
PKG_VERSION: "1.0"

jobs:
create-release:
Expand Down
5 changes: 5 additions & 0 deletions src/demo-multiverse/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
</properties>
<dependencyManagement>
<dependencies>

<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
Expand Down Expand Up @@ -76,6 +77,10 @@
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-h2</artifactId>
</dependency>
</dependencies>
<build>
<defaultGoal>clean install</defaultGoal>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
import javax.persistence.Entity;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.transaction.Transactional;
import java.util.List;
@ApplicationScoped
@Transactional
public class TileRepoJPA implements Repo<Tile> {
@Inject
EntityManager em;
Expand All @@ -24,7 +26,7 @@ public void postConstruct(){

@Override
public List<Tile> findAll() {
return em.createNamedQuery("Tile.findAll", Tile.class)
return em.createQuery("select t from Tile t")
.getResultList();
}

Expand Down
5 changes: 5 additions & 0 deletions src/demo-multiverse/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
quarkus.banner.enabled=false
quarkus.devservices.enabled=false
mv.repoType=JPA
quarkus.datasource.db-kind=h2
quarkus.datasource.jdbc.url=jdbc:h2:mem:
quarkus.hibernate-orm.database.generation=create-drop

0 comments on commit c82b8d9

Please sign in to comment.