Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

intent: own-side agree on a self-reference (agree [Parent, Project] onProperty: Project) generates a reverse guard that does not compile - ProjectEntity.Project

Abierto
#7,989 0 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
1-2 días
Aptitud para principiantes
47/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java
Área
backend, testing

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 == Project is 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

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 eclipse-dirigible/dirigible

Todos los issues de eclipse-dirigible/dirigible

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.