[FLOW3-general] Doctrine Persistence
Karsten Dambekalns
karsten at typo3.org
Wed Aug 29 10:57:01 CEST 2012
Hi.
On 21.03.12 17:37, Regine Rosewich wrote:
> as far as I can see from the doctrine2 documentation it should be possible
> to create foreign-keys on a mysql table for ONE-TO-MANY OR MANY-TO-MAY
> associations with other than RESTRICT persisting cascades (ON DELETE or ON
> UPDATE). In my FLOW3 models I can do whatever I want (cascade = {"all"},
> cascade = {"all"} cascade = {"delete"}) I always get RESTRICTED on the
> foreign key in the mysql-database.
"Cascade operations are performed in memory. That means collections and
related entities are fetched into memory, even if they are still marked
as lazy when the cascade operation is about to be performed. However
this approach allows entity lifecycle events to be performed for each of
these operations.
…
To rely on the database level cascade operations for the delete
operation instead, you can configure each join column with the onDelete
option. See the respective mapping driver chapters for more information."
See
http://doctrine-orm.readthedocs.org/en/latest/reference/working-with-associations.html?highlight=cascade#transitive-persistence-cascade-operations
Regards,
Karsten
--
Karsten Dambekalns
TYPO3 Core Developer, FLOW3 / Phoenix Team
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the FLOW3-general
mailing list