You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2013/10/19 16:19:45 UTC
[2/2] git commit: ISIS-322: only create DB schema (for JDO
objectstore)...
ISIS-322: only create DB schema (for JDO objectstore)...
... if datanucleus.autoCreateSchema is set to 'true'
This change means that we should be able to run on the Google App Engine
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/bf918a67
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/bf918a67
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/bf918a67
Branch: refs/heads/master
Commit: bf918a672da23f2b86d49a0c76382ee316ee96c4
Parents: 2d5ed82
Author: Dan Haywood <da...@apache.org>
Authored: Sat Oct 19 15:00:19 2013 +0100
Committer: Dan Haywood <da...@apache.org>
Committed: Sat Oct 19 15:00:19 2013 +0100
----------------------------------------------------------------------
.../jdo/datanucleus/DataNucleusApplicationComponents.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/bf918a67/component/objectstore/jdo/jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusApplicationComponents.java
----------------------------------------------------------------------
diff --git a/component/objectstore/jdo/jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusApplicationComponents.java b/component/objectstore/jdo/jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusApplicationComponents.java
index d73fb00..791c8e6 100644
--- a/component/objectstore/jdo/jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusApplicationComponents.java
+++ b/component/objectstore/jdo/jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusApplicationComponents.java
@@ -62,7 +62,10 @@ public class DataNucleusApplicationComponents implements ApplicationScopedCompon
final Set<String> classesToBePersisted = catalogClassesToBePersisted(objectSpecs);
- createSchema(props, classesToBePersisted);
+ final boolean createSchema = Boolean.parseBoolean( props.get("datanucleus.autoCreateSchema") );
+ if(createSchema) {
+ createSchema(props, classesToBePersisted);
+ }
namedQueryByName = Collections.unmodifiableMap(catalogNamedQueries(objectSpecs));