Changes between Version 41 and Version 42 of S3/S3Model/ComponentResources


Ignore:
Timestamp:
02/07/14 10:42:37 (11 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3Model/ComponentResources

    v41 v42  
    6868IMPORTANT: Component definitions in dynamically loaded models must be in the class which defines the ''master table''! (because otherwise the component definition would not be found when the model is loaded).
    6969
     70=== Simple Components ===
     71
    7072For simple components, it is sufficient to specify the foreign key as join:
    7173
     
    8385}}}
    8486
     87=== Filtered Components ===
     88
    8589Component joins can be filtered, so that only a subset of the records in the component table forms the actual component:
    8690
     
    97101
    98102It is possible to link the same component table to the same master table more than once using different joins and/or filters.
     103
     104=== Single / Multiple Component Records ===
    99105
    100106Sometimes it may be necessary to move fields out of the master table into a component in order to have better control over access permissions to these fields, or to hold the same fields for multiple master tables in a single table. In these cases the a record in the master table can only have exactly one corresponding record in the component.
     
    115121
    116122IMPORTANT: Note that it is possible, but '''not recommendable''', to change the multiple-setting dynamically in the controller environment: setting multiple=False does not allow to choose a particular component record, but simply selects the first (by ID) that matches the query. Thus, where the query can change (e.g. due to different authorization levels), then it is difficult to predict which record that would be, and different users may see different records despite multiple=False (which can be deliberate at times, though).
    117 == Link-Table Components ==
     123
     124=== Link-Table Components ===
    118125
    119126Components can be bound to their master records via link-tables. In such cases, the foreign key constraints for the component link are all in a separate link-table, whereas both the master table and the component table are completely independent:
     
    136143  - increased complexity to handle such links in CRUD and XML/XSLT
    137144
    138 === Link Actuation Options ===
     145==== Link Actuation Options ====
    139146
    140147The RESTful methods can handle the link-table in a number of different ways, depending on the CRUD method and the configured option:
     
    158165
    159166Other RESTful methods such as S3Search or S3Report may have their own definitions.
    160 === Declaration ===
     167
     168==== Declaration ====
    161169
    162170The basic syntax of a link-table component link declaration is: