Changes between Version 11 and Version 12 of S3/S3Model/SuperEntities
- Timestamp:
- 11/08/10 19:31:50 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
S3/S3Model/SuperEntities
v11 v12 65 65 Both, instance tables as well as shared components need to be linked to the super-entity. This can be done by inserting a ''super-key'' field into the instance/component table which must have the same name as the primary key of the super-entity. You can use the {{{super_link()}}} function as a DRY method for this: 66 66 67 {{{ 68 resourcename = "presence" 69 tablename = "%s_%s" % (prefix, resourcename) 70 table = db.define_table(tablename, 71 super_link(db.pr_pentity), # pe_id 72 super_link(db.sit_situation), # sit_id 73 ...) 74 }}} 67 75 === Updating a Super-Entity === 68 76