diff options
author | kmoore | 2008-07-21 14:29:30 +0000 |
---|---|---|
committer | kmoore | 2008-07-21 14:29:30 +0000 |
commit | 8fd4d5c40b16c6d43e9844bd540d4b18244515b9 (patch) | |
tree | 7955db0b47e37fff01ea5e9c5b8b76f953f54d78 /jpa | |
parent | f2d6f330e101575c39460e1065adcf3fe4699847 (diff) | |
download | webtools.dali-8fd4d5c40b16c6d43e9844bd540d4b18244515b9.tar.gz webtools.dali-8fd4d5c40b16c6d43e9844bd540d4b18244515b9.tar.xz webtools.dali-8fd4d5c40b16c6d43e9844bd540d4b18244515b9.zip |
232881 - check for null attribute name since this is possible in an orm.xml file
Diffstat (limited to 'jpa')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPersistentType.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPersistentType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPersistentType.java index 492b2db3bb..dc7054e620 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPersistentType.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPersistentType.java @@ -261,7 +261,13 @@ public class GenericOrmPersistentType extends AbstractOrmJpaContextNode implemen return new FilteringIterator<OrmPersistentAttribute, OrmPersistentAttribute>(attributes()) { @Override protected boolean accept(OrmPersistentAttribute o) { - return attributeName.equals(o.getName()); + if (attributeName == null && o.getName() == null) { + return true; + } + if (attributeName != null && attributeName.equals(o.getName())) { + return true; + } + return false; } }; } |