Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java
index 11f6b92c47..a41c13db72 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java
@@ -526,8 +526,17 @@ public abstract class AbstractPrimaryKeyValidator
// **************** attribute mappings in general *************************
+ /**
+ * Return all the attribute mappings of the given type
+ * mapping with transient attribute mappings being excluded
+ */
protected Iterable<AttributeMapping> getAttributeMappings(TypeMapping typeMapping) {
- return CollectionTools.collection(typeMapping.getAllAttributeMappings());
+ return new FilteringIterable<AttributeMapping>(CollectionTools.collection(typeMapping.getAllAttributeMappings())) {
+ @Override
+ protected boolean accept(AttributeMapping o) {
+ return !StringTools.stringsAreEqual(o.getKey(), MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY);
+ }
+ };
}
/**

Back to the top