You could also write your own Visitor and handle the deletes yourself if you
wish:
http://docs.transfer-orm.com/html/transferapi/transfer/com/Transfer.html#visitObjectGraph()

On Wed, Apr 1, 2009 at 8:28 AM, Brian Kotek <[email protected]> wrote:

> All of the cascade methods traverse the entire object graph. There is no
> "up" or "down" in an object graph, objects are related to other objects. How
> is Transfer supposed to know "which way" you think is "down"?
>
> In essence, when it comes to deletes you almost certainly don't want to be
> using cascadeDelete, it's just far too dangerous unless you're absolutely
> sure what is going to happen. Either delete the items manually or rely on
> delete cascading in your database (and make sure you purge the cache as
> necessary).
>
>
>
> On Wed, Apr 1, 2009 at 8:19 AM, Jeroen Knoef <[email protected]> wrote:
>
>>
>> Hi all,
>> The cascadeDelete function traverses all relationships, both up and
>> down. This appears counter intuitive to me. As far as I know, DBMS's
>> cascade in one direction, down to records that are referencing the
>> record being deleted. It looks natural to me if Transfer would have
>> implemented a similar functionality. With the current implementation,
>> this method is possibly very dangerous, because a delete of some
>> record could clear out the whole database.
>>
>> I know there is the depth argument, but my objects don't always know
>> how deep to go. Also, a change in the data model might lead to a code
>> change, which is what Transfer is abstracting.
>>
>> Can you explain why this method behaves as it does? Maybe with some
>> examples where this behaviour is just what you need? I'm quite curious
>> because I couldn't come up with one myself.... thanks for replying.
>>
>> Jeroen
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to