On Wednesday, August 27, 2003, at 05:19 AM, Tore Halset wrote:
> Hello
>
> A<<-->a_in_b<-->>B are flattened to
> A<<-->>B
>
> What are the best way to delete a A? Deleting the A should delete all
> entries in a_in_b for the given A.
This situation is indeed not handled by Cayenne. I will open a bug
report. Just need to define the right criteria for automatically
deleting join records. Any ideas are welcomed (one being an explicit
setting of additional delete rule on a flattened relationship).
For now delete rules for tables that do not map to an ObjEntity may be
specified at the database level. I think even MySQL has some limited
support for row delete rules (?)
> I have tried with delete rule nullify, but it did not work. I am afraid
> that a cascade (on the A-->>B relation) will delete all B's.
Exactly. Delete rule will have no effect on the join table in case of
flattened relationships.
Andrus
This archive was generated by hypermail 2.0.0 : Wed Aug 27 2003 - 17:57:52 EDT