Changes between Version 41 and Version 42 of S3/S3Model/ComponentResources
- Timestamp:
- 02/07/14 10:42:37 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
S3/S3Model/ComponentResources
v41 v42 68 68 IMPORTANT: 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). 69 69 70 === Simple Components === 71 70 72 For simple components, it is sufficient to specify the foreign key as join: 71 73 … … 83 85 }}} 84 86 87 === Filtered Components === 88 85 89 Component joins can be filtered, so that only a subset of the records in the component table forms the actual component: 86 90 … … 97 101 98 102 It 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 === 99 105 100 106 Sometimes 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. … … 115 121 116 122 IMPORTANT: 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 === 118 125 119 126 Components 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: … … 136 143 - increased complexity to handle such links in CRUD and XML/XSLT 137 144 138 === Link Actuation Options===145 ==== Link Actuation Options ==== 139 146 140 147 The RESTful methods can handle the link-table in a number of different ways, depending on the CRUD method and the configured option: … … 158 165 159 166 Other RESTful methods such as S3Search or S3Report may have their own definitions. 160 === Declaration === 167 168 ==== Declaration ==== 161 169 162 170 The basic syntax of a link-table component link declaration is: