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.

This commit is contained in:
hns 2009-02-18 15:48:43 +00:00
parent 7044354843
commit fab316995a

View file

@ -484,7 +484,7 @@ public final class DbMapping {
*/
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 @@ public final class DbMapping {
if (inheritsStorage()) {
return parentMapping.getStorageTypeName();
}
return (dbSourceName == null) ? null : typename;
return (getDbSourceName() == null) ? null : typename;
}
/**