diff options
author | kmoore | 2007-10-31 20:14:06 +0000 |
---|---|---|
committer | kmoore | 2007-10-31 20:14:06 +0000 |
commit | 3ef7fed217a8f25a3c34f321f185446c582d614e (patch) | |
tree | 2304b54aea4f38e46def67cd3600638f7629285c | |
parent | c2c08126cfd8e2e7804a8249915b4d78bccde9f5 (diff) | |
download | webtools.dali-3ef7fed217a8f25a3c34f321f185446c582d614e.tar.gz webtools.dali-3ef7fed217a8f25a3c34f321f185446c582d614e.tar.xz webtools.dali-3ef7fed217a8f25a3c34f321f185446c582d614e.zip |
207873 - allow access to persistence-unit-defaults even when orm.xml file is not directly listed in the persistence.xml
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/PersistenceUnitContext.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/PersistenceUnitContext.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/PersistenceUnitContext.java index c0b5d2cc33..722d54c436 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/PersistenceUnitContext.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/PersistenceUnitContext.java @@ -72,9 +72,9 @@ public class PersistenceUnitContext extends BaseContext public PersistenceUnitContext(IContext parentContext, PersistenceUnit persistenceUnit) { super(parentContext); this.persistenceUnit = persistenceUnit; + this.mappingFileContexts = buildMappingFileContexts(); this.persistenceUnitMetadatas = buildPersistenceUnitMetadatas(); this.duplicateJavaPersistentTypes = new ArrayList<JavaTypeContext>(); - this.mappingFileContexts = buildMappingFileContexts(); this.javaPersistentTypeContexts = buildJavaClassesContexts(); this.generatorRepository = buildGeneratorRepository(); } @@ -85,8 +85,8 @@ public class PersistenceUnitContext extends BaseContext private List<PersistenceUnitMetadata> buildPersistenceUnitMetadatas() { List<PersistenceUnitMetadata> metadatas = new ArrayList<PersistenceUnitMetadata>(); - for (MappingFileRef mappingFileRef : persistenceUnit.getMappingFiles()) { - XmlRootContentNode content = xmlRootContentNodeFor(mappingFileRef); + for (MappingFileContext mappingFileContext : this.mappingFileContexts) { + XmlRootContentNode content = mappingFileContext.getXmlRootContentNode(); if (content != null && content.getEntityMappings() != null && ! content.getEntityMappings().getPersistenceUnitMetadata().isAllFeaturesUnset()) { metadatas.add(content.getEntityMappings().getPersistenceUnitMetadata()); |