Changes between Version 17 and Version 18 of RESTController
- Timestamp:
- 11/20/09 01:19:50 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RESTController
v17 v18 70 70 == Model == 71 71 72 Example for definition of a joined resource in the model:72 Example for definition of a component table in the model: 73 73 74 74 {{{ … … 95 95 where: 96 96 97 - '''module''' is the name of the module in which the joined resourceis defined (prefix)98 - '''resource''' is the name of the joined resource99 - '''multiple''' indicates whether this is a 1:N(True) or 1:1 (False) join, defaults to True97 - '''module''' is the name of the module in which the component is defined (prefix) 98 - '''resource''' is the name of the component 99 - '''multiple''' indicates whether this is a N:1 (True) or 1:1 (False) join, defaults to True 100 100 - '''joinby''' describes the join keys: 101 101 - pass a single field name for natural joins (same key field in both tables) 102 102 - pass a dictionary of ''tablename=fieldname'' pairs for primary/foreign key matching, in which: 103 103 - ''tablename'' is the name of the respective primary table 104 - ''fieldname'' the name of the foreign key in the joinedtable that points to the ''id'' field in the primary table104 - ''fieldname'' the name of the foreign key in the component table that points to the ''id'' field in the primary table 105 105 - e.g. {{{joinby = dict(pr_person='person_id')}}} 106 - '''fields''' is a list of the fields in the joined resourcethat shall appear in list views:106 - '''fields''' is a list of the fields in the component that shall appear in list views: 107 107 - if omitted or set to None, all readable fields will be included 108 108