ProjectResource (Semantic Module)
The ProjectResource semantic module is applied to associations pointing from the Project entity to target resource entities (e.g., Task, Milestone, Document, Board).
This links sub-resources to a specific project, establishing clear project data boundaries and enabling the Serverless Engine to secure project-scoped routes as well as aggregate cross-project collection queries.
Technical Specifications
Section titled “Technical Specifications”| Attribute | Specification |
|---|---|
| Scope | Association (Applied to relationships between entities) |
| Data Type | Association / Foreign Key |
| Has Configuration | No |
Design Guidelines & Validation Rules
Section titled “Design Guidelines & Validation Rules”- When to use: Apply to associations defined on the
Projectentity that point to resource tables to indicate that the resource belongs to the project container (e.g.Project.tasks -> Task). - When not to use:
- Do not apply to the association between the project and the user entity (use
ProjectMembersinstead). - Do not confuse with organization boundaries (use
OrganizationResourcesfor tenant-level partitioning).
- Do not apply to the association between the project and the user entity (use
Configuring in the Domain Modeler
Section titled “Configuring in the Domain Modeler”To link resources to your project context in the user interface:
- Open the Domain Modeler and select your
Projectentity. - Add a new association pointing to the resource entity (e.g.
Task). - Set the relationship settings:
- Multiple: Check this option if the project contains multiple instances of the resource (e.g. tasks).
- In the association details panel, select
ProjectResourceunder Semantic Modules. - Save your changes.
Runtime Behavior
Section titled “Runtime Behavior”The Serverless Engine uses this semantic module when evaluating Match Project Role:
- Nested Project Routes (
/projects/:projectId/tasks): Verifies that the requested child entity is linked to:projectIdvia theProjectResourceassociation. - Aggregated Cross-Project Routes (
GET /tasks): Automatically filters the collection query to only return records belonging to projects where the caller is a member (WHERE project_id IN (SELECT project_id FROM project_members WHERE user_id = :userId)).