From 79970a0b7736de41ff84d9e72341164d5c8dad4a Mon Sep 17 00:00:00 2001 From: hns Date: Fri, 20 Apr 2007 13:44:39 +0000 Subject: [PATCH] * Check if prototype column is mapped to a HopObject property in constructor. If so, set the property to the prototype name. --- src/helma/objectmodel/db/Node.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/helma/objectmodel/db/Node.java b/src/helma/objectmodel/db/Node.java index f9986d10..033787aa 100644 --- a/src/helma/objectmodel/db/Node.java +++ b/src/helma/objectmodel/db/Node.java @@ -137,6 +137,13 @@ public final class Node implements INode, Serializable { this.name = (name == null) ? "" : name; created = lastmodified = System.currentTimeMillis(); state = TRANSIENT; + + if (prototype != null && dbmap != null) { + String protoProperty = dbmap.columnNameToProperty(dbmap.getPrototypeField()); + if (protoProperty != null) { + setString(protoProperty, prototype); + } + } } /**