Changes between Version 7 and Version 8 of S3/S3Hierarchy
- Timestamp:
- 05/21/14 21:34:26 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
S3/S3Hierarchy
v7 v8 41 41 [[Image(hierarchy_data_model.png)]] 42 42 43 A typical data model for a hierarchical taxonomy could look like:43 A typical data model for a hierarchical taxonomy (with simple self-reference) could look like: 44 44 45 45 {{{#!python … … 58 58 ) 59 59 }}} 60 61 For a super-entity self-reference, the parent-field is defined as reference to the super entity: 62 63 {{{#!python 64 tablename = "vulnerability_indicator" 65 define_table(tablename, 66 # Instance table 67 super_link("parameter_id", "stats_parameter"), 68 # Parent-field for the hierarchy: 69 Field("parent", "reference stats_parameter", 70 ), 71 Field("name", 72 ), 73 s3_comments(), 74 *s3_meta_fields() 75 ) 76 }}} 60 77 == Configuration == 61 78