Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2007-05-29 15:06:58 +0000
committerkmoore2007-05-29 15:06:58 +0000
commitb1dca8b11a7c850880d2ff03347c9850914af2b9 (patch)
tree9c4d5f305592952cd2b40174408dd3bca750e6a2 /jpa/plugins
parentca86cb3de979ff0f47fc2135a17e4b0ae9cb1b40 (diff)
downloadwebtools.dali-b1dca8b11a7c850880d2ff03347c9850914af2b9.tar.gz
webtools.dali-b1dca8b11a7c850880d2ff03347c9850914af2b9.tar.xz
webtools.dali-b1dca8b11a7c850880d2ff03347c9850914af2b9.zip
188893 - entity-mappings package element updating not working
Diffstat (limited to 'jpa/plugins')
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/EntityMappingsInternal.java26
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/XmlRelationshipMappingContext.java6
2 files changed, 7 insertions, 25 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/EntityMappingsInternal.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/EntityMappingsInternal.java
index ad83a90531..0a6faee299 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/EntityMappingsInternal.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/content/orm/EntityMappingsInternal.java
@@ -474,37 +474,15 @@ public class EntityMappingsInternal extends XmlEObject
}
}
- /**
- * Returns the value of the '<em><b>Package For Xml</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Package For Xml</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Package For Xml</em>' attribute.
- * @see #setPackageForXml(String)
- * @see org.eclipse.jpt.core.internal.content.orm.OrmPackage#getEntityMappingsForXml_PackageForXml()
- * @model volatile="true"
- * @generated NOT
- */
public String getPackageForXml() {
return getPackageInternal();
}
- /**
- * Sets the value of the '{@link org.eclipse.jpt.core.internal.content.orm.EntityMappingsInternal#getPackageForXml <em>Package For Xml</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Package For Xml</em>' attribute.
- * @see #getPackageForXml()
- * @generated NOT
- */
public void setPackageForXml(String newPackageForXml) {
- String oldValue = getPackageForXml();
setPackageInternal(newPackageForXml);
if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_MAPPINGS_INTERNAL__PACKAGE_FOR_XML, oldValue, newPackageForXml));
+ //pass in oldValue of null because we don't store the value from the xml, see super.eNotify()
+ eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_MAPPINGS_INTERNAL__PACKAGE_FOR_XML, null, newPackageForXml));
}
public void makePersistenceUnitMetadataForXmlNull() {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/XmlRelationshipMappingContext.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/XmlRelationshipMappingContext.java
index bc77028d1d..120116297b 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/XmlRelationshipMappingContext.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/XmlRelationshipMappingContext.java
@@ -8,6 +8,7 @@
*******************************************************************************/
package org.eclipse.jpt.core.internal.platform;
+import org.eclipse.jdt.core.IType;
import org.eclipse.jpt.core.internal.IAttributeMapping;
import org.eclipse.jpt.core.internal.IPersistentType;
import org.eclipse.jpt.core.internal.ITypeMapping;
@@ -68,7 +69,10 @@ public abstract class XmlRelationshipMappingContext extends XmlAttributeContext
}
Attribute attribute = relationshipMapping().getPersistentAttribute().getAttribute();
if (attribute != null) {
- return JavaRelationshipMapping.buildReferenceEntityTypeName(attribute.typeSignature(), relationshipMapping().getPersistentType().findJdtType());
+ IType iType = relationshipMapping().getPersistentType().findJdtType();
+ if (iType != null) {
+ return JavaRelationshipMapping.buildReferenceEntityTypeName(attribute.typeSignature(), iType);
+ }
}
}
return super.getDefault(key, defaultsContext);

Back to the top