Comments (2)
IIRC the JoinColumn::$onDelete
config is only used to configure the foreign key column in the database, the ORM doesn't use that to make any decisions about mapping relationships. Actually, the only place I can find the ORM using that information is in the UnitOfWork
when it is determining the order of operations for DELETE statements, and it only takes into consideration "cascade" and "set null".
It does look like right now it's known the ORM might not work as expected with onDelete="restrict"
, see doctrine/orm#10783 for that.
So I don't think we have an actionable bug within this package at the moment, if something changes in the ORM around this situation then things can be updated here if need be.
from doctrineextensions.
It seems there might be some confusion here. While it's true that JoinColumn::$onDelete primarily configures the behavior of the foreign key column in the database, its impact extends beyond that. In MySQL, onDelete="restrict" should enforce that a referenced row cannot be deleted while it's still referenced by another table.
However, if this isn't being reflected as expected in the ORM, it could indeed be considered a bug. While the ORM may currently handle onDelete="cascade" and "set null" appropriately, the fact that onDelete="restrict" isn't behaving as anticipated could signify a bug.
The reported behavior should ideally align with database behavior for consistency and predictability.
from doctrineextensions.
Related Issues (20)
- in Symfony 7 annotation_reader no exists
- [Loggable] Add option to store prev data
- The bundle not set automatcly the value to updated_at and created_at columns when persisting data HOT 6
- Missing Reference Listener in the documentation
- Cannot get DoctrineExtensions to work with Symfony 7 HOT 3
- The service "gedmo.listener.softdeleteable" has a dependency on a non-existent service "annotation_reader". HOT 2
- Table ext_log_entries very very slow on queries HOT 7
- Timestampable issue mapping expects array HOT 2
- LogEntryInterface::getObjectClass() @phpstan-return is missing null HOT 2
- [Tree] Missing path value on insert a new document HOT 2
- Error for symfony v7 HOT 5
- A [SoftDeleteable] cycle has been detected, so a topological sort is not possible. The getCycle() method provides the list of nodes that form the cycle.
- Timestamble error getRawDateValue HOT 10
- Can't escape quote in orderby with the function INSTR() HOT 1
- Declaration of Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter::addFilterConstraint not compatible with Doctrine\ORM\Query\Filter\SQLFilter::addFilterConstraint HOT 2
- XSD out of sync with mapping drivers
- Any plans to release a new version compatible with doctrine 3.x? HOT 13
- Library is not compatible with doctrine/dbal ^4 HOT 4
- [Tree] parent parameter typing in updateNode method (Nested strategy) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doctrineextensions.