|
Basic Mappings The _db entry describes the database to use for storing objects of this type. dbname is the name of a database as defined in the db.properties file. _db = dbnameThe _table entry tells Helma which table to use for objects of this type within the database. _table = TABLENAMEThe _id entry defines the column to use as primary key. Helma requires a single primary key with no other functionality. _id = ID_COLUMNThe optional _name entry tells Helma which database column to use as object name. This is important for the user prototype, since it defines which column constitutes the user name. _name = NAME_COLUMNThe _parent entry contains a comma-separated list of properties of objects of this type to be used as parent. Objects must know their parent in order to generate correct URLs in their href() function. _parent = property1, property2.collectionX, root.collectionYIf an entry in the _parent item does not contain a dot, it is interpreted as an object property of the current object that acts as the object's parent. If an entry contains a dot character, the part after the dot is interpreted as a collection in the parent object in which the current object is contained. If the _parent is specified as "root", it is not interpreted as a property of the current object. Instead, the application's root object is used as parent object. A type can inherit its data mapping and functions from another type. This is done with the _extends entry. Simply specify the name of the parent type: _extends = parenttypeExtended prototypes are usually stored in the same relational database table. Thus, Helma needs a way to tell which row in the table should be instantiated with which object prototype. This is done using the _prototype entry, specifying a column in the table containing the name of the prototype for each row. _prototype = PROTO_COLUMN
... comment
andi,
Wednesday, 23. May 2007, 15:48
ad _parent entry:
if the entry in the _parent item does not refer to a collection, then the default child-collection "_children" is used.
objects of this types must be members of the parent-collection. ... 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
|
||||