Helma logo
helma.org » Home > docs > guide > mapping
Home > docs > guide > mapping

Object-Relational Mapping Guide

This collection of documents describes the property file syntax used to map persistent HopObjects to relational database tables.

Mappings between HopObjects and relational database tables are defined in type.properties files located in the persistent HopObject's prototype directory (e.g. apps/myApp/myProto). A typical type.properties file 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 in the pages below.


Next: Basic Mappings

  ... browse