Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
makfly avatar

Symfony:doctrine Relations Skill

  • 499 installs
  • 190 repo stars
  • Updated August 6, 2026
  • makfly/superpowers-symfony

symfony:doctrine-relations is a Claude Code skill that models OneToMany, ManyToMany, and inheritance mappings in Doctrine entities with correct owning sides, cascades, and fetch strategies for Symfony backend developers.

About

symfony:doctrine-relations is a skill in makfly/superpowers-symfony that guides Doctrine ORM relationship mapping for Symfony applications. Developers use it when defining OneToMany, ManyToMany, or inheritance hierarchies and need correct owning versus inverse sides, cascade persist and remove behavior, and lazy versus eager fetch plans. The skill fits agent sessions writing Entity classes, migration-safe association changes, or fixing bidirectional sync bugs and N+1 query patterns in PHP backends. Reach for symfony:doctrine-relations when association annotations or attributes must align with Symfony best practices instead of generic SQL or Laravel Eloquent patterns.

  • Configure bidirectional associations correctly
  • Choose lazy, eager, or extra-lazy fetch modes
  • Set cascade persist, remove, and orphan removal
  • Design join tables for ManyToMany cleanly
  • Prevent N+1 queries in API serialization

Symfony:Doctrine Relations by the numbers

  • 499 all-time installs (skills.sh)
  • Ranked #125 of 922 Databases skills by installs in the Skillselion catalog
  • Data as of Aug 11, 2026 (Skillselion catalog sync)
npx skills add https://github.com/makfly/superpowers-symfony --skill symfonydoctrine-relations

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs499
repo stars190
Last updatedAugust 6, 2026
Repositorymakfly/superpowers-symfony

How do you map Doctrine entity relations in Symfony?

Model OneToMany, ManyToMany, and inheritance mappings in Doctrine entities with correct owning sides, cascades, and fetch strategies.

Who is it for?

Symfony backend developers defining or fixing Doctrine entity associations who need owning-side and cascade guidance.

Skip if: Developers on non-PHP stacks, raw SQL schema design without Doctrine, or Symfony routes and controllers with no entity changes.

When should I use this skill?

The user asks to model Doctrine relations, fix owning side errors, configure cascades, or set fetch strategies in Symfony entities.

What you get

Doctrine entity relation mappings, cascade and fetch configuration, and association definitions ready for migrations.

  • entity relation mappings
  • cascade and fetch configuration

Files

SKILL.mdMarkdownGitHub ↗

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

Related skills

How it compares

Use symfony:doctrine-relations for Symfony Doctrine entity graphs; use raw migration skills when only SQL DDL changes are needed without ORM mapping.

FAQ

Which relation types does symfony:doctrine-relations cover?

symfony:doctrine-relations covers OneToMany, ManyToMany, and inheritance mappings in Doctrine entities. The skill emphasizes correct owning sides, cascades, and fetch strategies for Symfony backends.

Does symfony:doctrine-relations help with cascade and fetch settings?

symfony:doctrine-relations helps configure cascade persist and remove behavior plus lazy or eager fetch strategies. Developers use it to avoid bidirectional sync bugs and N+1 queries in Doctrine associations.

Databasesdatabases

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.