intent: own-side agree on a self-reference (agree [Parent, Project] onProperty: Project) generates a reverse guard that does not compile - ProjectEntity.Project
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 47/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Java
- Star
- 278
- Fork
- 97
- Merge trung bình
- 16 giờ 46 phút
- Pull request đã merge (30 ngày)
- 265
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của eclipse-dirigible/dirigible
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
eclipse-dirigible/dirigible#7958 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
intent: a create-from without fromStatus answers 200 on a missing or unknown source id (no 400/404)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
eclipse-dirigible/dirigible#7945 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
eclipse-dirigible/dirigible#7891 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
eclipse-dirigible/dirigible#6538 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Create shortcut for Camel filesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
eclipse-dirigible/dirigible#4812 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của eclipse-dirigible/dirigible
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefixCó thể đã có người làm @ItsDeadlyProgrammer đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
appsmithorg/appsmith#42471 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
code-maintenance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
bug priority: medium Review effort [1-5]: 3 status: needs-triage type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
carlos-emr/carlos#5258 ·
Maintainer thường phản hồi trong vòng 1 ngày