mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-04 05:44:58 +00:00
Simplify entity relationship and enforce foreign key constraints
Removed the resetStoredObject() method call from StoredObject, adjusted the storedObjectId column in the stored_object_version table to be NOT NULL, and moved the association setup of the StoredObject entity directly into the constructor in StoredObjectVersion. This ensures that every StoredObjectVersion has a valid StoredObject and maintains database integrity.
This commit is contained in:
@@ -346,7 +346,6 @@ class StoredObject implements Document, TrackCreationInterface
|
||||
throw new \UnexpectedValueException('This stored object does not contains this version');
|
||||
}
|
||||
$this->versions->removeElement($storedObjectVersion);
|
||||
$storedObjectVersion->resetStoredObject();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user