intent: own-side agree on a self-reference (agree [Parent, Project] onProperty: Project) generates a reverse guard that does not compile - ProjectEntity.Project
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 47/100
Línea de trabajo
Start by reading the generator code that emits the reverse junction guard for own-side agree relations, then inspect the generated ProjectRepository.java example in the issue. Reproduce the failure with the ProjectTask self-reference YAML and confirm the generated Java fails to compile because ProjectEntity has no Project property. Done means parsing rejects this combination or the generated guard compiles and checks Parent.Project == Project on user writes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
An own-side agree (#7631) on a self-reference generates Java that does not compile, and the whole module then fails to load.
- name: ProjectTask
checks:
- { kind: agree, relations: [Parent, Project], onProperty: Project,
message: "The parent task belongs to a different project" }
relations:
- { name: Project, kind: manyToOne, to: Project, composition: true, required: true }
- { name: Parent, kind: manyToOne, to: ProjectTask }
The intent means "a sub-task's parent is in the same project" (Parent.Project == Project). Generate returns 200 and the parse is clean. The reverse ("junction") guard, however, is emitted into ProjectRepository, the target of the own-side relation Project:
// gen/projects/data/project/ProjectRepository.java
private static java.util.Map<String, Object> agreedValues(ProjectEntity entity) {
values.put("Project", entity.Project); // ProjectEntity has no Project
On 14.95.0 this gives javac error ... ProjectRepository.java:490:37: cannot find symbol. Every unit that touches ProjectRepository then fails too (48 units in BusinessIntents/base-projects + base-timesheets), and every controller of the module is unregistered.
The own-side form works on a plain relation, for example agree [Project, Company] onProperty Company on Milestone, where the reverse guard reads ProjectEntity.Company. It breaks when onProperty names the record's own relation (Project). That relation is a property of the record itself, not of the target, so the reverse guard should not be generated for it at all, or it should be keyed on a property the target actually has.
Expected
- Parse refuses the combination, or the generator emits a guard that compiles.
Parent.Project == Projectis checked on every user write (400).
Found by
BusinessIntents/base-projects#38 (train 14.95.0). The module works around it with a hand-written guard.
- Lenguaje dominante
- Java
- Estrellas
- 278
- Forks
- 97
- Merge medio
- 16 h 46 min
- PR fusionados (30 d)
- 265
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de eclipse-dirigible/dirigible
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
eclipse-dirigible/dirigible#7958 ·
Los mantenedores suelen responder en 1 día
-
intent: a create-from without fromStatus answers 200 on a missing or unknown source id (no 400/404)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
eclipse-dirigible/dirigible#7945 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
eclipse-dirigible/dirigible#7891 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
eclipse-dirigible/dirigible#6538 ·
Los mantenedores suelen responder en 1 día
-
Create shortcut for Camel filesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
eclipse-dirigible/dirigible#4812 ·
Los mantenedores suelen responder en 1 día
Todos los issues de eclipse-dirigible/dirigible
Issues similares
-
dev/release: verify-release-candidate.sh runs 0 Java tests with Debian's MavenPosiblemente ocupada @kou la tomó hoy. AbiertoType: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/arrow-adbc#4947 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
lysine-dev/okhttp#9814 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
1.20.1-FORGE bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
MehVahdJukaar/WoodGood#1348 ·
-
documentation faq
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100