From 48a66d85bf11cf1d9e6a4dfbb38ddc335ec517ec Mon Sep 17 00:00:00 2001 From: Finn Stutzenstein Date: Fri, 21 Aug 2020 07:54:59 +0200 Subject: [PATCH] Add reverse models for generic relations in models.txt (closes #5337) --- docs/models.txt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/models.txt b/docs/models.txt index 24adf6247..7c0e55dda 100644 --- a/docs/models.txt +++ b/docs/models.txt @@ -11,8 +11,8 @@ Relations: to one category. The reverse field is `motion_ids` which may be `motion_ids: (motion/category_id)[]` indicating, that there are many motion ids. - []: This indicated multiple ids. For an example see above. - - */: This is a generic relation (analog: `(*/)[]` a generic - list relation) with fqids as values. + - {x,y,z}/: This is a generic relation (analog: `({x,y,z}/)[]` a + generic list relation) with fqids as values to the given ollections x, y and z. - If no field is specified, there is no reverse relation. Structured Fields: - There are template fields (see autoupdate service interface) with a `$` as @@ -339,14 +339,14 @@ Interface personal_note { star: boolean; user_id: user/personal_note_$_ids; - content_object_id: */personal_note_ids; + content_object_id: {motion}/personal_note_ids; } Interface tag { id: number; name: string; - tagged_ids: (*/tag_ids)[]; + tagged_ids: ({agenda_item,assignment,motion,topic}/tag_ids)[]; meeting_id: meeting/tag_ids; } @@ -362,7 +362,7 @@ Interface agenda_item { weight: number; level: number; // calculated. - content_object_id: */agenda_item_id; + content_object_id: {motion,motion_block,assignment,topic}/agenda_item_id; parent_id: agenda_item/child_ids; child_ids: (agenda_item/parent_id)[]; tag_ids: (tag/tagged_ids)[]; @@ -375,7 +375,7 @@ Interface list_of_speakers { id: number; closed: boolean; - content_object_id: */list_of_speakers_id; + content_object_id: {motion,motion_block,assignment,topic,mediafile}/list_of_speakers_id; speaker_ids: (speaker/list_of_speakers_id)[]; projection_ids: (projection/element_id)[]; current_projector_ids: (projector/current_element_ids)[]; @@ -430,7 +430,7 @@ Interface motion { forwarding_tree_motion_ids: (Id)[]; // Calculated: All children (derived_motion_ids), grand children, ... and all parents (origin_id). state_id: motion_state/motion_ids; recommendation_id: motion_state/motion_recommendation_ids; - recommendation_extension_reference_ids: (*/referenced_in_motion_recommendation_extension_ids)[]; // current option: motion + recommendation_extension_reference_ids: ({motion}/referenced_in_motion_recommendation_extension_ids)[]; referenced_in_motion_recommendation_extension_ids: (motion/recommendation_extension_reference_ids)[]; category_id: motion_category/motion_ids; block_id: motion_block/motion_ids; @@ -701,7 +701,7 @@ Interface mediafile { list_of_speakers_id: list_of_speakers/content_object_id; projection_ids: (projection/element_id)[]; current_projector_ids: (projector/current_element_ids)[]; - attachment_ids: (*/attachment_ids)[]; + attachment_ids: ({motion,topic,assignment}/attachment_ids)[]; meeting_id: meeting/mediafile_ids; // Reverse relations for meetings, if a mediafile is used as a special resource @@ -731,7 +731,7 @@ Interface projector { current_projection_ids: (projection/current_projector_id)[]; // A relation to the currently projected elements to get a direct link, if // the element is projected. - current_element_ids: (*/current_projector_ids)[]; + current_element_ids: ({motion,mediafile,list_of_speakers,motion_block,assignment,agenda_item,user,assignment_poll,motion_poll,projector_message,projector_countdown}/current_projector_ids)[]; preview_projection_ids: (projection/projector_preview_id)[]; history_projection_ids: (projection/projector_history_id)[]; used_as_reference_projector_meeting_id: meeting/reference_projector_id; @@ -751,7 +751,7 @@ Interface projection { current_projector_id: projector/current_projection_ids; preview_projector_id: projector/preview_projection_ids; history_projector_id: projector/history_projection_ids; - element_id: */projection_ids; + element_id: {motion,mediafile,list_of_speakers,motion_block,assignment,agenda_item,user,assignment_poll,motion_poll,projector_message,projector_countdown}/projection_ids; } Interface projectiondefault {