webmcp

view demo-app/model/media_type.lua @ 1:985024b16520

Version 1.0.1

New feature: JSON requests

Changes in ui.paginate: Current page setting is directly fetched from CGI params, instead of view params

Changed behavior of load methods of atom library to accept nil as input

Bugfixes in mondelefant_atom_connector timestamp(tz) loaders

Added global constant _WEBMCP_VERSION containing a version string
author jbe
date Tue Nov 17 12:00:00 2009 +0100 (2009-11-17)
parents 9fdfb27f8e67
children
line source
1 MediaType = mondelefant.new_class()
2 MediaType.table = 'media_type'
4 MediaType:add_reference{
5 mode = '1m', -- one (1) MediaType is set for many (m) media
6 to = "Medium", -- name of referenced model (quoting avoids auto-loading here)
7 this_key = 'id', -- own key in media_type table
8 that_key = 'media_type_id', -- other key in medium table
9 ref = 'media', -- name of reference
10 back_ref = 'media_type', -- each autoloaded Medium automatically refers back to the MediaType
11 default_order = '"name", "id"' -- order media by SQL expression "name", "id"
12 }

Impressum / About Us