[cvs] expresso commit by lhamel: use getMappedDataContext(); patch by alex

JCorporate Ltd jcorp at jcorporate.com
Thu May 19 20:04:19 UTC 2005


Log Message:
-----------
use getMappedDataContext(); patch by alex bolgarov

Modified Files:
--------------
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj:
        MultiDBObject.java

Revision Data
-------------
Index: MultiDBObject.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/MultiDBObject.java,v
retrieving revision 1.70
retrieving revision 1.71
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/MultiDBObject.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/MultiDBObject.java -u -r1.70 -r1.71
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/MultiDBObject.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/MultiDBObject.java
@@ -865,8 +865,14 @@
         oneDBObj.setAttribute(SHORT_NAME, shortName);
         myDBObjects.put(shortName, oneDBObj);
 
-        if (getDataContext() == null) {
-            setDataContext(oneDBObj.getDataContext());
+        if (log.isDebugEnabled()) {
+            log.debug("addDBObj(): MultiDBObj Data context: " + getDataContext() +
+                    ", DBObj mapped Data context: " + oneDBObj.getMappedDataContext());
+        }
+
+        if (getDataContext() == null || DBConnection.DEFAULT_DB_CONTEXT_NAME.equals(getDataContext())) {
+              //setDataContext(oneDBObj.getDataContext());
+             setDataContext(oneDBObj.getMappedDataContext());
         }
 
         /* Check to see if all of the db objects are in the same database */


More information about the cvs mailing list