Changes between Version 11 and Version 12 of S3/S3Model/SuperEntities


Ignore:
Timestamp:
11/08/10 19:31:50 (11 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3Model/SuperEntities

    v11 v12  
    6565Both, 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:
    6666
     67{{{
     68resourcename = "presence"
     69tablename = "%s_%s" % (prefix, resourcename)
     70table = db.define_table(tablename,
     71                        super_link(db.pr_pentity), # pe_id
     72                        super_link(db.sit_situation), # sit_id
     73                        ...)
     74}}}
    6775=== Updating a Super-Entity ===
    6876