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:
2024-09-04 14:28:13 +02:00
parent 667e144681
commit 615629d1b4
3 changed files with 7 additions and 19 deletions

View File

@@ -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();
}
/**