Merge pull request #5518 from FinnStutzenstein/noteGenericRelations

Add reverse models for generic relations in models.txt (closes #5337)
This commit is contained in:
Finn Stutzenstein 2020-08-21 07:56:00 +02:00 committed by GitHub
commit 829a44177a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.
- <T>[]: This indicated multiple ids. For an example see above.
- */<field>: This is a generic relation (analog: `(*/<field>)[]` a generic
list relation) with fqids as values.
- {x,y,z}/<field>: This is a generic relation (analog: `({x,y,z}/<field>)[]` 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_$<meeting_id>_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 {