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 2014/10/02 19:10:14 UTC
[1/2] git commit: ISIS-912: fix so that --fixture
com.mycompany.foo.MyFixtures works from the commandline.
Repository: isis
Updated Branches:
refs/heads/master a064fe362 -> 6d1826045
ISIS-912: fix so that --fixture com.mycompany.foo.MyFixtures works from the commandline.
nb: as the JIRA issue says, is also necessary to specify system property -D isis.persistor.datanucleus.install-fixtures=true
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/fb8186ab
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/fb8186ab
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/fb8186ab
Branch: refs/heads/master
Commit: fb8186ab3d902ab5834b9f7fd03dd0a82e9909fa
Parents: a064fe3
Author: Jeroen van der Wal <je...@stromboli.it>
Authored: Thu Oct 2 12:13:43 2014 +0200
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Oct 2 18:04:36 2014 +0100
----------------------------------------------------------------------
.../java/org/apache/isis/core/runtime/system/SystemConstants.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/fb8186ab/core/runtime/src/main/java/org/apache/isis/core/runtime/system/SystemConstants.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/SystemConstants.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/SystemConstants.java
index 68c7100..f4f0ca4 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/SystemConstants.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/SystemConstants.java
@@ -190,7 +190,7 @@ public final class SystemConstants {
* Key by which requested fixture (eg via command line) is made available in
* {@link IsisConfiguration}.
*/
- public final static String FIXTURE_KEY = ConfigurationConstants.ROOT + "fixture";
+ public final static String FIXTURE_KEY = ConfigurationConstants.ROOT + "fixtures";
/**
* Key by which requested user (eg via command line) is made available in
[2/2] git commit: ISIS-809: view models now work for those mapped via
JDO to views (ie non-durable persistence types)
Posted by da...@apache.org.
ISIS-809: view models now work for those mapped via JDO to views (ie non-durable persistence types)
@javax.jdo.annotations.PersistenceCapable(
identityType = IdentityType.NONDURABLE,
table = "InvoiceSummaryForPropertyDueDate", ... )
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/6d182604
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/6d182604
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/6d182604
Branch: refs/heads/master
Commit: 6d182604564cd121f1f1fa889574dd222b6e5100
Parents: fb8186a
Author: Jeroen van der Wal <je...@stromboli.it>
Authored: Thu Oct 2 12:18:05 2014 +0200
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Oct 2 18:04:37 2014 +0100
----------------------------------------------------------------------
.../spi/DataNucleusIdentifierGenerator.java | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/6d182604/core/objectstore-jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/DataNucleusIdentifierGenerator.java
----------------------------------------------------------------------
diff --git a/core/objectstore-jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/DataNucleusIdentifierGenerator.java b/core/objectstore-jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/DataNucleusIdentifierGenerator.java
index d3cd960..6cbce6d 100644
--- a/core/objectstore-jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/DataNucleusIdentifierGenerator.java
+++ b/core/objectstore-jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/DataNucleusIdentifierGenerator.java
@@ -30,6 +30,7 @@ import org.apache.isis.applib.ViewModel;
import org.apache.isis.core.commons.debug.DebugBuilder;
import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
import org.apache.isis.core.metamodel.adapter.oid.RootOid;
+import org.apache.isis.core.metamodel.adapter.oid.Oid.State;
import org.apache.isis.core.metamodel.facets.object.viewmodel.ViewModelFacet;
import org.apache.isis.core.metamodel.spec.ObjectSpecId;
import org.apache.isis.core.metamodel.spec.ObjectSpecification;
@@ -79,15 +80,24 @@ public class DataNucleusIdentifierGenerator implements IdentifierGenerator {
return "1";
}
- if(pojo instanceof ViewModel) {
- ViewModel viewModel = (ViewModel) pojo;
- return viewModel.viewModelMemento();
+ final ObjectSpecification spec = getSpecificationLookup().lookupBySpecId(objectSpecId);
+ if(spec.containsFacet(ViewModelFacet.class)) {
+ ViewModelFacet viewModelFacet = spec.getFacet(ViewModelFacet.class);
+ return viewModelFacet.memento(pojo);
}
final Object jdoOid = getJdoPersistenceManager().getObjectId(pojo);
return JdoObjectIdSerializer.toOidIdentifier(jdoOid);
}
+ //////////////////////////////////////////////////////////////////
+ // context
+ //////////////////////////////////////////////////////////////////
+
+ protected SpecificationLoader getSpecificationLookup() {
+ return IsisContext.getSpecificationLoader();
+ }
+
// //////////////////////////////////////////////////////////////
// Debugging