incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ke...@apache.org
Subject svn commit: r1214053 - /incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AutoMapper.java
Date Wed, 14 Dec 2011 04:51:39 GMT
Author: kevin
Date: Wed Dec 14 04:51:39 2011
New Revision: 1214053

URL: http://svn.apache.org/viewvc?rev=1214053&view=rev
Log:
ISIS-153: @NotPersisted annotation is not used. This commit fixes the Query engine, to ignore
@NotPersisted fields.

Modified:
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AutoMapper.java

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AutoMapper.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AutoMapper.java?rev=1214053&r1=1214052&r2=1214053&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AutoMapper.java
(original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/sql/sql-impl/src/main/java/org/apache/isis/runtimes/dflt/objectstores/sql/auto/AutoMapper.java
Wed Dec 14 04:51:39 2011
@@ -33,6 +33,7 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.apache.isis.core.metamodel.adapter.util.InvokeUtils;
 import org.apache.isis.core.metamodel.adapter.version.SerialNumberVersion;
+import org.apache.isis.core.metamodel.facets.notpersisted.NotPersistedFacet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.runtimes.dflt.objectstores.sql.CollectionMapper;
@@ -191,6 +192,12 @@ public class AutoMapper extends Abstract
                 if (true) {
                     final ObjectAdapter field = patternAssoc.get(pattern);
                     if (field != null) {
+                        String id = patternAssoc.getId();
+                        ObjectAssociation oa = spec.getAssociation(id);
+                        NotPersistedFacet fc = oa.getFacet(NotPersistedFacet.class);
+                        if (fc != null) {
+                            continue;
+                        }
 
                         if (foundFields == 0) {
                             sql.append(" WHERE ");



Mime
View raw message