Skip to content

Commit

Permalink
fix: snap
Browse files Browse the repository at this point in the history
  • Loading branch information
loicmathieu committed Dec 10, 2021
1 parent ba780e4 commit 0763a08
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 135 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.quarkus.devtools.codestarts.quarkus;

import static io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartCatalog.Language.JAVA;
import static io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartCatalog.Language.KOTLIN;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ class QuarkusCodestartBuildIT extends PlatformAwareTestBase {
"spring-web-codestart",
"picocli-codestart",
"hibernate-orm-codestart",
"reactive-messaging-codestart",
"hibernate-orm-panache-codestart",
"hibernate-orm-panache-kotlin-codestart");
"reactive-messaging-codestart");

@BeforeAll
static void setUp() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package ilove.quark.us

{#if !input.selected-extensions-ga.contains('io.quarkus:quarkus-hibernate-orm-panache-kotlin')}
import javax.persistence.Entity
import javax.persistence.GeneratedValue
import javax.persistence.Id
Expand All @@ -10,7 +9,7 @@ import javax.persistence.Id
*
* To use it, get access to a JPA EntityManager via injection.
*
* \{@code
* {@code
* @Inject
* lateinit var em:EntityManager;
*
Expand All @@ -30,38 +29,3 @@ class MyKotlinEntity {
var id: Long? = null
var field: String? = null
}
{/if}
{#if input.selected-extensions-ga.contains('io.quarkus:quarkus-hibernate-orm-panache-kotlin')}
import io.quarkus.hibernate.orm.panache.kotlin.PanacheEntity
import io.quarkus.hibernate.orm.panache.kotlin.PanacheCompanion
import javax.persistence.Entity

/**
* Example JPA entity defined as a Kotlin Panache Entity.
* An ID field of Long type is provided, if you want to define your own ID field extends <code>PanacheEntityBase</code> instead.
*
* This uses the active record pattern, you can also use the repository pattern instead:
* {@see https://quarkus.io/guides/hibernate-orm-panache-kotlin#defining-your-repository}.
*
* Usage (more example on the documentation)
*
* \{@code
*
* fun doSomething() {
* val entity1 = MyKotlinEntity();
* entity1.field = "field-1"
* entity1.persist()
*
* val entities:List<MyKotlinEntity> = MyKotlinEntity.listAll()
* }
* }
*/
@Entity
class MyKotlinEntity: PanacheEntity() {
companion object: PanacheCompanion<MyKotlinEntity> {
fun byName(name: String) = list("name", name)
}

lateinit var field: String
}
{/if}

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 0763a08

Please sign in to comment.