Currently the on-delete="cascade" option is only available on bi-directional/inverse collections. However, there are some instances where we don't want the collections on the parent side of the relationship, creating a unidirection relationship from child to parent. It would be nice to be able to do something like:
{code:xml} <class name="Parent"> .... </class> {code} {code:xml} <class name="Child"> ... <many-to-one name="parent" on-delete="cascade"/> </class> {code}
So that child entries are deleted when the parent goes away. Obviously , in this particular example it would be OK to add the collection, but in the actual situation we'd like this in the collection would serve no practical purpose.
It's not critical by any means -- we can just tewak the schema by hand and that's fine. But it seems like an easy enough thing to add and would make the schema generation/update tools a little more robust. |
|