spec: is identify_by inherited through extends?

Abierto
#692 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
json, markdown, python

Línea de trabajo

Read ontology/ontology.md (especially “Identifiers” and the derived-subtype example), core-spec/spec.md, and ontology/ontology.json to decide how the rule should be expressed consistently. The issue recommends documenting that identify_by is not inherited and adding a validation warning, but these changes involve specification and implementation work; done means the inheritance rule and example are clear and the warning covers the described case.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

needs-triage

ontology/ontology.md ("Identifiers") says identify_by "allows modelers to list the names of relationships that form the preferred identifier of a concept". Nothing in ontology.md, core-spec/spec.md, or ontology/ontology.json says whether a concept that extends another inherits the parent's identify_by, or must declare its own.

The reference implementation (now in apache/ossie-converters, ontology/src/ossie_ontology/converter/spec_to_ossie/converter.py, _populate_ontology) resolves the question one way without documenting it: it builds identify_by only from the concept's own identify_by list. A subtype that declares none — as Customer did in the first revision of #310 — resolves to an empty identifier even though it extends a concept with a preferred identifier and every one of its objects is identifiable by it.

Note the asymmetry: lookup_concept_relationship does walk extends when resolving a relationship name, so identify_by: [ nr ] on the subtype resolves to BusinessPartner.nr. The lookup inherits; the identifier list does not.

First raised by @jbonofre in the #310 review.

Proposal
  1. Document the rule. Recommended: identify_by is not inherited and must be declared on every entity type that is meant to be referenced. This matches the engine's behaviour today, and avoids ambiguity when a concept has more than one parent in extends.
  2. Add a validation warning when an entity type with a non-empty extends declares no identify_by and none of its parents' identifiers is restated — the silent empty identifier is what made #310's defect invisible until the engine ran.
  3. Update the Employee-style derived-subtype example in ontology.md to show the explicit declaration.
Lenguaje dominante
Python
Estrellas
2.7k
Forks
353
Merge medio
3 d 19 h
PR fusionados (30 d)
86

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/ossie

Todos los issues de apache/ossie

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.