There are some classes of differences between an existing table schema and a CDT that are detected, but cannot be automatically resolved by opting to have the system update the tables for you. ![]() Use the attribute nillable="true" to prevent columns in your data store from enforcing a "non-null" constraint. Be aware of these differences when designing your data stores. The Query Database Smart Service can read from and write to tables with composite keys.ĭatabases can enforce constraints on column values that are not enforced by Appian on CDT field values.įor example, a database may require a column value to be "not null", but the field in Appian can be empty.The Write to Data Store Entity and Delete from Data Store Entities smart services as well as query rules will only work with tables that have composite keys if a separate unique column in the table is mapped to a field in the CDT that is annotated with the annotation.The a!queryEntity() function can read data from tables with composite keys, however the totalCount and identifiers fields of the returned data subset will be incorrect unless a separate unique column in the table is mapped to a field in the CDT that is annotated with the annotation.Data Store Entities can be mapped to tables with composite keys provided that the annotation is not used when mapping CDT fields to the composite key columns. ![]() Tables with composite keys are supported in the following ways: When working with tables with composite keys, we recommend that you either find an existing column in the table with unique values or create a synthetic column in the table with unique values and map that column to a field of the CDT annotated with the annotation. ![]() xsd:int has the same maximum value as a CDT field of type Number(Integer).įor more information on default column types based on Appian types or XSD types, see Generating Database Tables from CDTs. Of the supported databases, MySQL is the only database that trims the padding from the returned value and therefore will not trigger the version update.įor integer values, use xsd:int as the element type instead of xsd:integer. If this behavior is not desired, consider using VARCHAR or the equivalent for the target database. This is because the trailing spaces will be trimmed from the value to be stored. When used in conjunction with a data type annotated with the annotation, this behavior may cause the system to issue an update statement to the database, triggering the version value to increment, even if the significant part of the value remains unchanged. When mapping to existing tables, if the inferred column type doesn't match an existing table's column type, you must explicitly define the column type using the annotation with the columnDefinition attribute.įor example, if you have an xsd:string typed element that maps to a column defined as CHAR(40), use the following annotation within the XSD: mapping to a column defined with CHAR(N) where N > 1, the database may return a value padded with blanks if the length of the value is less than N. The column type is inferred from the XSD type according to its associated data type.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |