From 95544768f628b62e02947fcbd00d61bd98ec90e6 Mon Sep 17 00:00:00 2001 From: Srinivasa Segu Date: Mon, 22 Jan 2007 23:59:44 +0000 Subject: [PATCH] Fix to use the specified result-set-mapping for named native queries git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@498859 13f79535-47bb-0310-9956-ffa450edef68 --- .../openjpa/persistence/XMLPersistenceMetaDataParser.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java index 74eecc63a..719abe559 100644 --- a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java +++ b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java @@ -1450,6 +1450,10 @@ public class XMLPersistenceMetaDataParser meta.setResultType(type); } + val = attrs.getValue("result-set-mapping"); + if (val != null) + meta.setResultSetMappingName(val); + Object cur = currentElement(); Object scope = (cur instanceof ClassMetaData) ? ((ClassMetaData) cur).getDescribedType() : null;