Mapping of Objects with PROTOTYPE and ID column strange errors

Franz Philipp Moser <[email protected]>
Newsgroups gmane.comp.java.helma.general
Message-ID <[email protected]>
Hi list,

I try the following. Prototype for Mgr:

type.properties
>>>>>
_db = catalog
_table = MGRS

_id = ID
_prototype = PROTOTYPE
#_parent = target

target = object(HopObject)
target.local.1 = MGR_F_TARGET_ID
target.foreign.1 = ID
target.local.2 = PROTOTYPE
target.foreign.2 = MGR_F_TARGET_PROTOTYPE
<<<<<

And in the root prototype:

>>>>>
_db = catalog
_table = ROOT

_id = ID
_prototype = PROTOTYPE

things           = object(Mgr)
things.local.1   = ID
things.foreign.1 = MGR_F_TARGET_ID
things.local.2   = PROTOTYPE
things.foreign.2 = MGR_F_TARGET_PROTOTYPE
<<<<<<

When I try to access this Object I get the following sql Error:

[ERROR] Error retrieving Node "things" from [object Root]
java.sql.SQLException: Invalid local name 'PROTOTYPE' on [catalog.Root]
        at
helma.objectmodel.db.Relation$Constraint.addToQuery(Relation.java:1336)
        at
helma.objectmodel.db.Relation.renderConstraints(Relation.java:985)
        at helma.objectmodel.db.Relation.buildQuery(Relation.java:863)
        at
helma.objectmodel.db.NodeManager.getNodeByRelation(NodeManager.java:1628)
        at helma.objectmodel.db.NodeManager.getNode(NodeManager.java:278)
        at
helma.objectmodel.db.WrappedNodeManager.getNode(WrappedNodeManager.java:79)
        at helma.objectmodel.db.Node.getProperty(Node.java:1816)
        at helma.objectmodel.db.Node.get(Node.java:1747)
        at helma.scripting.rhino.HopObject.getFromNode(HopObject.java:816)
        at helma.scripting.rhino.HopObject.get(HopObject.java:790)
        at
org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1544)
        at
org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1375)
        at
org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1364)
        at
org.mozilla.javascript.gen.c24._c5(/home/philipp/helma-1.6rc3/apps/catalog/code/Global/objectFunctions.js:54)
        at
org.mozilla.javascript.gen.c24.call(/home/philipp/helma-1.6rc3/apps/catalog/code/Global/objectFunctions.js)
        at
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
        at
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
        at
org.mozilla.javascript.gen.c24.call(/home/philipp/helma-1.6rc3/apps/catalog/code/Global/objectFunctions.js)
        at org.mozilla.javascript.Context.call(Context.java:538)
        at helma.scripting.rhino.RhinoEngine.invoke(RhinoEngine.java:296)
        at
helma.framework.core.RequestEvaluator.run(RequestEvaluator.java:488)
        at java.lang.Thread.run(Thread.java:595)

And in the sql log I find the following entry:
[2007/07/02 22:10:54] [INFO] SQL SELECT_BYKEY ROOT 212: SELECT ROOT.*
FROM ROOT WHERE ROOT.ID = 0
[2007/07/02 22:10:54] [INFO] SQL SELECT_BYRELATION MGRS 1: null

Can somebody tell me why these mappings seems a Problem to helma? I use
the current head from helma:

cvs -d :pserver:[email protected]:/opt/cvs/hop co -r HEAD helma

cu Philipp
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.