r9520 - helma/helma/trunk/src/helma/objectmodel/db

[email protected]
Newsgroups gmane.comp.java.helma.cvs
Message-ID <[email protected]>
Author: hannes
Date: 2009-02-18 16:48:43 +0100 (Wed, 18 Feb 2009)
New Revision: 9520

Modified:
   helma/helma/trunk/src/helma/objectmodel/db/DbMapping.java
Log:
Fix bug where storage type name is null when a extended prototype inherits the _db but has its own _table. Allow extended prototypes to only override the _db, but not the _table.

Details at http://dev.helma.org/trac/helma/changeset/9520

Modified: helma/helma/trunk/src/helma/objectmodel/db/DbMapping.java
===================================================================
--- helma/helma/trunk/src/helma/objectmodel/db/DbMapping.java	2009-02-18 15:43:48 UTC (rev 9519)
+++ helma/helma/trunk/src/helma/objectmodel/db/DbMapping.java	2009-02-18 15:48:43 UTC (rev 9520)
@@ -484,7 +484,7 @@
      */
     public DbSource getDbSource() {
         if (dbSource == null) {
-            if ((tableName != null) && (dbSourceName != null)) {
+            if (dbSourceName != null) {
                 dbSource = app.getDbSource(dbSourceName);
             } else if (parentMapping != null) {
                 return parentMapping.getDbSource();
@@ -1385,7 +1385,7 @@
         if (inheritsStorage()) {
             return parentMapping.getStorageTypeName();
         }
-        return (dbSourceName == null) ? null : typename;
+        return (getDbSourceName() == null) ? null : typename;
     }
 
     /**
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.