You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2021/02/04 17:39:11 UTC
[isis-app-helloworld] branch jdo updated: ISIS-2512: config
jpa->schema
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch jdo
in repository https://gitbox.apache.org/repos/asf/isis-app-helloworld.git
The following commit(s) were added to refs/heads/jdo by this push:
new 42be2e3 ISIS-2512: config jpa->schema
42be2e3 is described below
commit 42be2e3a85c006451ff87dc338342a5ed29ed3aa
Author: Andi Huber <ah...@apache.org>
AuthorDate: Thu Feb 4 18:38:55 2021 +0100
ISIS-2512: config jpa->schema
---
.../modules/hello/dom/hwo/HelloWorldObject.java | 2 +-
.../modules/hello/dom/hwo/HelloWorldObjects.java | 1 -
.../java/domainapp/modules/hello/types/Name.java | 1 -
src/main/java/domainapp/webapp/AppManifest.java | 4 ++-
src/main/resources/application.yml | 31 +++++++++++-----------
src/main/resources/config/application.properties | 12 ++++-----
6 files changed, 25 insertions(+), 26 deletions(-)
diff --git a/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObject.java b/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObject.java
index 0207c88..4f5b164 100644
--- a/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObject.java
+++ b/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObject.java
@@ -29,7 +29,7 @@ import domainapp.modules.hello.types.Notes;
@DomainObjectLayout() // causes UI events to be triggered
public class HelloWorldObject implements Comparable<HelloWorldObject> {
- private HelloWorldObject(){}
+ public HelloWorldObject(){}
public HelloWorldObject(final String name) {
this.name = name;
diff --git a/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObjects.java b/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObjects.java
index d92dd8d..b9a4fb4 100644
--- a/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObjects.java
+++ b/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObjects.java
@@ -14,7 +14,6 @@ import org.apache.isis.applib.annotation.SemanticsOf;
import org.apache.isis.applib.services.repository.RepositoryService;
import org.apache.isis.persistence.jdo.applib.integration.JdoSupportService;
-import domainapp.modules.hello.dom.hwo.QHelloWorldObject;
import domainapp.modules.hello.types.Name;
@DomainService(
diff --git a/src/main/java/domainapp/modules/hello/types/Name.java b/src/main/java/domainapp/modules/hello/types/Name.java
index f3457b9..a70b4fc 100644
--- a/src/main/java/domainapp/modules/hello/types/Name.java
+++ b/src/main/java/domainapp/modules/hello/types/Name.java
@@ -7,7 +7,6 @@ import java.lang.annotation.Target;
import javax.jdo.annotations.Column;
-import org.apache.isis.applib.annotation.Editing;
import org.apache.isis.applib.annotation.Parameter;
import org.apache.isis.applib.annotation.ParameterLayout;
import org.apache.isis.applib.annotation.Property;
diff --git a/src/main/java/domainapp/webapp/AppManifest.java b/src/main/java/domainapp/webapp/AppManifest.java
index e99ca85..86995b9 100644
--- a/src/main/java/domainapp/webapp/AppManifest.java
+++ b/src/main/java/domainapp/webapp/AppManifest.java
@@ -26,6 +26,8 @@ import domainapp.modules.hello.HelloWorldModule;
IsisModuleTestingH2ConsoleUi.class,
HelloWorldModule.class
})
-@PropertySource(IsisPresets.NoTranslations)
+@PropertySources({
+ @PropertySource(IsisPresets.NoTranslations),
+})
public class AppManifest {
}
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 82ff9da..e53c19e 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -44,23 +44,24 @@ isis:
max-title-length-in-parented-tables: 0
persistence:
- jdo-datanucleus:
- impl:
- # note that properties under 'isis.persistence.jdo-datanucleus.impl' are passed through directly
- # to DataNucleus, and use variously camelCase or PascalCase rather than kebab-case
- datanucleus:
- schema:
- validateTables: true
- validateConstraints: true
+ schema:
+ auto-create-schemas: hello
+ create-schema-sql-template: "CREATE SCHEMA IF NOT EXISTS %S"
+
+# note that properties under 'datanucleus' must use camelCase rather than kebab-case
+datanucleus:
+ schema:
+ validateTables: true
+ validateConstraints: true
- persistenceByReachabilityAtCommit: false
- identifier:
- case: MixedCase
+ persistenceByReachabilityAtCommit: false
+ identifier:
+ case: MixedCase
- cache:
- level2:
- type: none
- mode: ENABLE_SELECTIVE
+ cache:
+ level2:
+ type: none
+ mode: ENABLE_SELECTIVE
resteasy:
jaxrs:
diff --git a/src/main/resources/config/application.properties b/src/main/resources/config/application.properties
index c0b1891..539fc17 100644
--- a/src/main/resources/config/application.properties
+++ b/src/main/resources/config/application.properties
@@ -8,12 +8,10 @@
#
-# note that properties under 'isis.persistence.jdo-datanucleus.impl' are passed through directly
-# to DataNucleus, and must use camelCase rather than kebab-case
+# note that properties under 'datanucleus' must use camelCase rather than kebab-case
-isis.persistence.jdo-datanucleus.impl.javax.jdo.option.ConnectionURL = jdbc:h2:mem:test
-isis.persistence.jdo-datanucleus.impl.javax.jdo.option.ConnectionDriverName = org.h2.Driver
-isis.persistence.jdo-datanucleus.impl.javax.jdo.option.ConnectionUserName = sa
-isis.persistence.jdo-datanucleus.impl.javax.jdo.option.ConnectionPassword =
+datanucleus.schema.autoCreateAll=true
+
+spring.datasource.platform=h2
+spring.datasource.url=jdbc:h2:mem:helloworld
-isis.persistence.jdo-datanucleus.impl.datanucleus.schema.autoCreateAll=true
\ No newline at end of file