Helma Logo
main list history
previous version  overview  next version

Version 2 by Philipp on 09. May 2008, 16:33

_dbTo store your HopObjects into a relational database system you need to define a database mapping. This is done in the type.properties files located in the persistent  HopObject's prototype directory (e.g. apps/myApp/MyPrototype). The type.properties files contain no JDBC connection information, which is located in the db.properties file in the Helma installation directory.

_table _db = datasourcename

The _db entry describes the database source to use for managing objects of this type. datasourcename is the connection's name defined in the db.properties, which is located in Helma’s installation directory. The db.properties file contains information about the JDBC connections, like the JDBC driver, the connection URL and the database username and password.

_table = tablename

The _table entry tells Helma which table to use for objects of this type within the database. To avoid problems with reserved words of SQL or your database system you should prefix your table names. (e.g. T_Story for the Story prototype’s table)

_prototype

_parent

_id

somePrimitiveProperty

_children

obj = object(SomeHopObject)

obj.local
 
obj.foreign

obj.local.X

obj.foreign.X

obj.logicalOperator

coll = collection(SomeHopObject)

coll.local

coll.foreign

coll.loadmode

coll.cachemode

coll.order

coll.filter

coll.filter.additionalTables

coll.hints

coll.maxSize

coll.accessname

coll.group

coll.group.order

coll.group.prototype

moutpointName = mountpoint(SomeTransientHopObject)

     removed
     added