Helma Logo
main list history
previous version  overview  next version

Version 1 by hannes on 17. February 2009, 22:17

Helma 1 comes with its own home-grown Object-Relational Mapping framework.

=== Overview

Helma O/R maps rows from relational tables against JavaScript host objects called *HopObjects*. HopObjects are defined by prototype directories, which contain the JavaScript code and templates (called *skins* in Helma lingo) to be applied to them. The object-relational mapping itself is defined in a type.properties file, which may look like this:

_db = antville
_table = AV_TEXT
_parent = site.stories
_id = TEXT_ID
_prototype = TEXT_PROTOTYPE
# object references
creator = object (user)
creator.local = TEXT_F_USER_CREATOR
creator.foreign = USER_ID
# primitive properties
title = TEXT_TITLE
text = TEXT_TEXT
createtime = TEXT_CREATETIME
modifytime = TEXT_MODIFYTIME
# collections
comments = collection (comment)
comments.local = TEXT_ID
comments.foreign = TEXT_F_TEXT_STORY
comments.filter = TEXT_ISONLINE > 0
comments.order = TEXT_MODIFYTIME DESC

The different kinds of entries and their use are described below.

=== Basic Mappings

=== Simple Property Mappings

=== Object Reference Mappings

=== Collection Mappings

=== Additional Join Conditions

=== Mountpoint Mappings

=== Advanced Settings