Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide validation for EntityContainer, EntitySet, and NavigationPropertyBinding statements #17

Open
GEricson opened this issue Aug 12, 2016 · 0 comments

Comments

@GEricson
Copy link
Contributor

There are a complex set of requirements and recommendations around specification of EntityContainers and EntitySets (including emplied EntitySets for NavigationProperties with ContainsTarget=True.

Validation should include the following rules:

  1. For each NavigationProperty in the schema that has ContainsTarget=True for all instances of its Type, there shall not be an EntitySet defined in the EntityContainer.
  2. For each NavigationProperty in the schema that has ContainsTarget=False, there should be an EntitySet in the EntityContainer corresponding to the Type of the NavigationPointer.
    • If missing produce a Warning (see Part 3, clause 13.4)
  3. For each NavigationProperty that has ContainsTarget=False in the type hierarchy of the EntityType of each EntitySet, the EntitySet should specify a NavigationPropertyBinding statement
    • If missing produce a Warning (see Part 3, clause 13.4)
    • For each NavigationPropertyBinding statement, the Path attribute shall specify a path to a NavigationProperty belonging to the type hierarchy of the EntityType of its EntitySet.
      • If the Path attribute refers to a NavigationProperty belonging to a type that is not the EntityType the path must contain the QualifiedName of that type. (See Part 3, clause 13.4.1)
  4. For each NavigationPropertyBinding statement, the Target attribute shall specify a type belonging to the type hierarchy of the NavigationProperty specified in the Path. (See Part 3, clause 13.4.2)
    • The target shall specify an EntitySet a Singleton, or a path to a NavigationProperty with ContainsTarget=true.
    • If a path to a NavigationProperty, no intermediate NavigationProperty shall have ContainsTarget=False.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants