Skip to content

Enhance QuckView definition with needed requirements #20

@jrodriguez-rc

Description

@jrodriguez-rc

Recently I opened a case because the quick view is not working in some CDS definitions.

It seems that there are some requirements about a nullable fields and associations for UUID type:

quick views needs OData Referential Constraints to work. Referential Constraints are only added if specific rules are met. The nullability of the principal property, the dependent property and the navigation property needs to align as specified:
https://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part3-csdl/odata-v4.0-errata03-os-part3-csdl-complete.html#_Toc453752543

A navigation property is nullable = false if it has cardinality 1. It is nullable = true if it has cardinality 0..1.
If there is a association to another root entity, although you specify cardinality 1, it will get cardinality 0..1 due to draft handling.

It is also import to know, that key fields are nullable = false. Non key fields are nullable = false except for UUID fields, these are also nullable = true due to technical implementation details.

To get the quick view working do not use UUID fields for the association conditions. In addition you might need to set the dependent field nullable = true with the annotation @Semantics.nullValueIndicatorFor.

@Semantics.nullValueIndicatorFor: 'OriginalField'
cast ('X' as boole_d) as NullValIndicator

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions