skip to main content
Corticon Server: Data Integration Guide : Advanced EDC Topics : Mapping and validating EDC database metadata : Types of mapping validation and validation errors
 

Try Corticon Now
Types of mapping validation and validation errors
When EDC is enabled, the Vocabulary elements - Entity, Attribute, and Association - each have additional properties that can be entered by the user, or inferred from database metadata. Corticon EDC validates these Vocabulary-to-Database mappings, and displays error conditions in a window. There are three aspects to the database validation function:

Dynamic Validation

Corticon Studio validates against imported database metadata as property values change in a Vocabulary. For example, for a database-persistent entity, if you specify a table name that does not exist in the database metadata, the system posts a validation message in the Problems View. Dynamic validation uses internal Corticon algorithms to attempt validation without accessing Hibernate which would connect to the Datsource to do full validation. Studio creates other error and warning validation messages depending on the severity of the issue detected, such as:
*Data type mismatch between an attribute and a column that cannot be coerced.
*Property values are explicitly contradicted by database metadata.
*You select a property value, then re-import metadata, only to find that the selected value no longer exists in the database schema.
Warnings are also created for "soft" errors, such as:
*If you designate a Vocabulary entity as datastore persistent, the system is unable to infer which database table best matches the entity name, dynamic validation issues a warning message.
*If the system is unable to unambiguously determine the join expression for a given association, the association is flagged as a warning until you select one of the allowable values.
Note: Dynamic validation is always performed against the imported copy of database metadata. You must ensure that metadata is imported into the Vocabulary whenever the database schema is modified.

On-Demand Validation

In addition to dynamic validation, Corticon Studio provides the Datasource action Validate Mappings, as illustrated in Validating EDC database mappings, so that you can validate the Vocabulary, as a whole, against the database schema. Unlike dynamic validation, on-demand validation is performed against the actual schema so it is considered the definitive test of Vocabulary mappings.
Internally, the system performs on-demand validation by building annotated Corticon Data Objects (CDOs) from Vocabulary metadata, then asking Hibernate to evaluate the readiness of those CDOs with respect to the database schema. If Hibernate "blesses" the CDOs, the system displays a message box indicating that the Vocabulary mappings are valid, and that the Vocabulary is considered fit-for-use in a Decision Service. If Hibernate detects any errors, the system presents the errors to the user in a scrolling dialog window. The on-demand validation action simply presents raw information returned from Hibernate with no additional transformations or interpretation.

Validation at Deployment

Corticon Server leverages on-demand validation functionality whenever a decision service is deployed. If Corticon Server detects a problem, it throws an exception and prevents deployment.