Attention! Creating new zero-entities is not supported for versions DTV 4.1- or higher (no new entry in entities list possible). Alternatively, links can be defined. Objects in old applications integrated via zero-entities are still supported.
A zero-entity is an entity which is only logically defined. It is used to set up 1:n relations without physically existing child elements. As opposed to a regular DataView relation - it requires three database tables: two master tables for entity 1,2 and one relation table - the relation to the zero-entity is a 1:n relation (refine relation) without a master table for entity 2. It is possible to save this table because master attributes of entity 2 are not managed in an assigned master table, but in the relation table together with possible relation attributes.
Example: In our meditronic application the item-document relation is a 1:n relation to the zero-entity. Each item can be described in several documents, but each document describes only one item. Thus the relation table can contain several relation records for one selected item. The C_ID_1 of these records is identical. In case of a regular DataView relation C_ID_2 would always be different and point to a document record in the master table document. Relation records and document records would form a 1:1 relation. So it seems obvious not to work with Document entity and to store possible document attributes in the relation table. Now only two tables are required in the database; the master table of items and the relation table with the document attributes in the form of relation attributes. The Document entity exists only logically as a zero-entity in the data model. All document attributes are a part of the relation table and can be managed by the user in the Refine list at the selected item.
Note! You should only model 1:n relations using a zero-entity if you are sure that you do not want to create any more relations to the zero-entity object in the data model of your application. This is impossible, because the object does not physically exist in the database. With regard to later refinements and improvements of your data model you should use zero-entities as rarely as possible. However, if you are forced to keep the number of tables in the database small for performance reasons, it may be more useful to realize 1:n relations using links.
After saving the zero-entity is defined as a logical model object. You do not need to create any database tables or default masks for the object.
How to Create a Relation to the Zero-Entity:
Proceed as described for -> Creating a regular relation and observe the following limitations: