Rules for processing a typeusage and specify the names of fields storing links

If the master Association has the heirs on the side of the master can be any object type from the inheritance hierarchy. However, there are conditions under which such a situation you want to exclude. To do this, in [Flexberry ORM] implemented TypeUsage-an attribute that limits the list of types in the inheritance hierarchy that is covered by this communication.

Processing A Typeusage

Built-in Flexberry Platform data services (SQLDataService and his heirs) should be treated TypeUsage as follows:

If you specify TypeUsage artisan properties, the property in the data structure match the foreign keys in the tables corresponding to the specified TypeUsage classes.

Names the foreign keys are: <Karolinenstr>_M<ПорядкНомерВTypeUsage>.«ПорядкНомерВTypeUsage» — starts at 0.

Thus, the above example is a table that has two foreign key names M_m0 (corresponding to M1) and M_m1 (corresponding to M2).

If there is a need to ask for a name and M_m0 M_m1 some mnemonic names, you need to:

  1. Disable the checkbox AutoGenerateTypeUsage.
  2. To properly set the attributes a typeusage and Storage.

For example, suppose you have a diagram of the form:

If nothing changes in the settings of the chart elements, for example, in table ДниПосещения will be foreign keys with names Пользователь_m0, Пользователь_m1, Пользователь_m2.

However, if linking classes Пользователь and ДниПосещения to put in TypeUsage and Storage the line Пользователь,Doctor,Пациент, the table ДниПосещения will be foreign keys with names Пользователь, Врач, Пациент. Similarly, you can configure dyelovoy link.