The purpose of this topic is to provide a detailed information about what will be visible in the Mapping Information view, when you select an array of reference types in the treeview and perform a relationship without Join table.
When you select an array of business objects in the treeview and the relationship is performed without Join table, then the Mapping Information view should look like the snapshot below:
The following options are available:
- Transient (skip this field) - check this if the field should not be stored in the database.
- Serialize to Blob - check this if the field's value should be stored serialized into a Blob column.
- Field behavior - defines the field behavior. It can be readwrite, readonly or insertonly. The default is readwrite.
- Item Type - the type of the array elements. In case of collection of similar types this option is disabled.
- Relationship - chooses the relationship kind. It can be 1:n (one to many), m:n (many to many) or join table. In this tutorial is shown the situation when the relationship is 1:n without Join table.
- Inverse field - this is the most specific characteristic in this case. In case of a simple 1:n relation, you can select the inverse field of the referenced class.
- Cascading delete - in case of cascading deletes, if a "Delete" occurs, the referenced object(s) will also be deleted (including their dependant referenced objects...). The [OpenAccess.Depend] attribute is added to the referenced persistent class or to the persistent values in a collection or array.
- Default fetch group - check this box to include the referenced items into the default fetchgroup.
- Managed collection - check this box to automatically update the inverse reference collection, while inserting or removing an object into or from the referenced collection. This option is enabled only if the m:n relationship is checked. That means it is disabled in the current case.
- Database Column Name - sets the name of the database column.
- Database Column Type - contains a list with the supported database datatypes.
- Database Column SQL Type - contains a list with the supported SQL types for the selected database.
||If you want to have Unicode support with sql server, it is necessary to specify one of the "n-types" like nvarchar here.|
- Database Column Length - sets the length (or precision) of the database column.
- Database Column Scale - sets the scale (digits after the decimal point).
- Converter - currently the data converter feature is not implemented.
- Part of primary key - signals if the field is part of the primary key or not. This is specified by the identity class in case of multiple field identity and by the field that holds the identity information, in case of single field identity. In case of the internal identity, none of the users fields will serve as primary key, so this box is never checked while using internal identity. This option is read-only.
- Throw an exception on commit if field is null - controls the treatment of null values. On default the field is mapped to a column that allows null values. If "throw an exception" is checked then the field is mapped to a column that does not allow null values. In such a case, an exception on commit time will be thrown, if the value of the field is null.