Always return our own DbColumns[]. This is needed in order to add/change mappings

in extended prototypes.
This commit is contained in:
hns 2003-11-18 17:36:13 +00:00
parent b97ba99e22
commit 6453f53bd9

View file

@ -810,9 +810,9 @@ public final class DbMapping implements Updatable {
this);
}
if ((dbSource == null) && (parentMapping != null)) {
/* if ((dbSource == null) && (parentMapping != null)) {
return parentMapping.getColumns();
}
} */
// Use local variable cols to avoid synchronization (schema may be nulled elsewhere)
if (columns == null) {
@ -845,9 +845,7 @@ public final class DbMapping implements Updatable {
Relation rel = columnNameToRelation(colName);
DbColumn col = new DbColumn(colName, meta.getColumnType(i + 1), rel, this);
// if (col.isMapped()) {
list.add(col);
// }
list.add(col);
}
columns = new DbColumn[list.size()];
columns = (DbColumn[]) list.toArray(columns);