/doctrine-relations
Define Doctrine entity relationships (OneToMany, ManyToMany, ManyToOne); configure cascade, orphan removal, multiple entity managers; prevent N+1 queries
$ npx -y skills add dev-toolings/superpowers-symfony --skill doctrine-relations --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/doctrine-relations
Context preview
The summary Claude sees to decide when to auto-load this skill.
Define Doctrine entity relationships (OneToMany, ManyToMany, ManyToOne); configure cascade, orphan removal, multiple entity managers; prevent N+1 queries
SKILL.md
doctrine-relations.SKILL.mdname: symfony:doctrine-relations allowed-tools: - Read - Write - Edit - Bash - Glob - Grep description: Define Doctrine entity relationships (OneToMany, ManyToMany, ManyToOne); configure cascade, orphan removal, multiple entity managers; prevent N+1 queries
Doctrine Relations (Symfony)
Use when
- Designing entity relations or schema evolution.
- Improving Doctrine correctness/performance.
Default workflow
1. Model ownership/cardinality and transactional boundaries. 2. Apply mapping/schema changes with migration safety. 3. Tune fetch/query behavior for hot paths. 4. Verify lifecycle behavior with targeted tests.
Guardrails
- Keep owning/inverse sides coherent.
- Avoid destructive migration jumps in one release.
- Eliminate accidental N+1 and over-fetching.
Progressive disclosure
- Use this file for execution posture and risk controls.
- Open references when deep implementation details are needed.
Output contract
- Entity/migration changes.
- Integrity and performance decisions.
- Validation outcomes and rollback notes.
References
- `reference.md`
- `docs/complexity-tiers.md`
Symfony AI development superpowers for Claude Code. 44 expert skills, 7 specialized subagents, and 13 slash commands covering API Platform v4, Doctrine ORM 3, TDD with Pest & PHPUnit, Symfony Messenger, security/voters, and DDD / hexagonal architecture.
Repo: dev-toolings/superpowers-symfony
Other skills on dev-toolings-superpowers-symfony.
- /api-platform-dto-resources
Map entities to API DTOs in API Platform v4 with the Symfony Object Mapper (#[Map], stateOptions) for decoupled input/output contracts
Open skill - /api-platform-filters
Implement API Platform filters - v4 Parameters API (QueryParameter) and legacy #[ApiFilter] - for search, date, range, boolean, and custom filtering
Open skill - /api-platform-resources
Configure API Platform v4 resources with explicit operations, pagination, and typed OpenAPI for clean, versioned REST/GraphQL APIs
Open skill - /api-platform-security
Secure API Platform resources with security expressions, voters, securityPostValidation, and operation-level access control
Open skill - /api-platform-serialization
Control API Platform serialization with groups, #[Context], IRI links (readableLink/writableLink), and custom context builders
Open skill - /api-platform-state-providers
Master API Platform v4 State Providers and Processors (ProviderInterface/ProcessorInterface) to decouple data retrieval and persistence from entities
Open skill

