|
Attaching HopObjects We now successfully established a database connection from Helma to the MySQL server and mapped the relational table data to HopObject properties. But still, these derived HopObjects are freely floating around in Helma space. There is no possibility to access HopObjects, yet. Helma even does not know about them. We need a HopObject that already is accessible, that is known by Helma. That's what the Root HopObject of an application is for. _children = collection(Person) _children.accessname = ID _children.order = LASTNAME ascYou can read this assignment the way "attach all HopObjects of the prototype Person as subnodes, indexed by the column ID of the corresponding relational table PERSON, and sorted ascending by the values in column LASTNAME". And because we save this document in Root they will be attached to the HopObject Root (you are right when you assume that you could do this with any other HopObject simply by creating such type.properties for its prototype in fact, we have done it before with the Person prototype).
... comment
tomdiesel,
Tuesday, 5. September 2006, 20:49
Misspelling in Tutorial
As far as I can see "Person" is misspelled in this Tutorial.
it should be spelled "PERSON". At least it works that way. _children = collection(PERSON) _children.accessname = ID _children.order = LASTNAME asc ... link
czv,
Thursday, 7. September 2006, 19:28
Hi tomdiesel! "Person" in that line refers to the prototype "Person" and not the db table "PERSON", so I think "Person" should be correct. Did you name your prototype "PERSON" instead of "Person" (how did you spell the directory name)?
... link ... comment |
navigation
Download
Community
Weblog
Mailing Lists
IRC Channel
Documentation
Introductions
Tools
Reference
Project
Roadmap
Bug Reporting
Source
Wiki
Tags
Updates
Related Projects
search
|
||||