Support For Soft Deletes (ORM)

33 views
Skip to first unread message

Seth Johnson

unread,
Nov 17, 2009, 11:07:14 AM11/17/09
to Object-Oriented Programming in ColdFusion
I am just starting out with ORM + OO and I am wondering what the best
way is to build in support for SoftDeletes.

Would it be good practice to have two functions in the Gateway.cfc
(softDelete() and hardDelete()) and have one function in the
Service.cfc which has two arguments (id and deleteType) and call
whichever gateway delete function that the controller asks for?

Or should there be one function in the Service.cfc for deleting and
then let the Gateway.cfc determine if the object supports softdeletes,
and if so do the soft delete instead?

Thank you for any insight!

Seth

Kevan Stannard

unread,
Nov 17, 2009, 1:41:52 PM11/17/09
to coldfu...@googlegroups.com
Seth, Tony Nelsons post on hibernate filters may be useful for you:



2009/11/18 Seth Johnson <cfx...@gmail.com>

--

You received this message because you are subscribed to the Google Groups "Object-Oriented Programming in ColdFusion" group.
To post to this group, send email to coldfu...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/coldfusionoo?hl=.



Seth Johnson

unread,
Nov 17, 2009, 1:58:57 PM11/17/09
to coldfu...@googlegroups.com

Yes, that looks like exactly what I was looking for. 

 

Thank you,

 

Seth

To unsubscribe from this group, send email to coldfusionoo...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages