implemented _extends to express prototype chains

This commit is contained in:
hns 2001-04-06 17:51:01 +00:00
parent 45d3cbec4e
commit 045ba6fb41

View file

@ -42,6 +42,7 @@ public class DbMapping implements Updatable {
String idField;
String nameField;
String extendsProto;
// descriptor for key generation method
private String idgen;
@ -102,10 +103,11 @@ public class DbMapping implements Updatable {
this.table = props.getProperty ("_tablename");
this.idgen = props.getProperty ("_idgen");
this.extendsProto = props.getProperty ("_extends");
String sourceName = props.getProperty ("_datasource");
if (sourceName != null) {
source = (DbSource) IServer.dbSources.get (sourceName.toLowerCase ());
source = app.getDbSource (sourceName);
if (source == null) {
// what we really want to do here is mark the DbMapping as invalid, so no data can be saved to it.
// throw new RuntimeException ("DbSource \""+sourceName+"\" not found for prototype "+typename);
@ -232,6 +234,10 @@ public class DbMapping implements Updatable {
return typename;
}
public String getExtends () {
return extendsProto;
}
/**
* Get the primary key column name for objects using this mapping.
*/