delete/remove is not exposed via AbstractDAO

812 views
Skip to first unread message

Ryan Kennedy

unread,
Apr 8, 2015, 4:17:15 PM4/8/15
to dropwiz...@googlegroups.com
I was surprised to notice that there's no delete/remove method on AbstractDAO in dropwizard-hibernate. There's a delete(Object) method in org.hibernate.Session, which AbstractDAO has a handle to. Does anyone know if there's a history to why there's no way to remove objects using AbstractDAO?

Is anyone using dropwizard-hibernate? I wonder how the omission of a pretty basic feature could have gone unaddressed for so long unless nobody's actually using it.

Ryan

Ryan Kennedy

unread,
Apr 8, 2015, 4:24:56 PM4/8/15
to dropwiz...@googlegroups.com
I suppose everyone's probably calling currentSession().delete(entity) inside of their DAO's, instead.

Ryan

Jérémie Panzer

unread,
Apr 9, 2015, 1:48:13 AM4/9/15
to dropwiz...@googlegroups.com

Chris Micali

unread,
Apr 9, 2015, 11:27:17 AM4/9/15
to dropwiz...@googlegroups.com
We an abstract DAOBase that extends AbstractDAO that adds delete, along with a few more helpers.

Carlo Barbara

unread,
Apr 9, 2015, 2:06:55 PM4/9/15
to dropwiz...@googlegroups.com
Yeah, that's what we have done too

--
You received this message because you are subscribed to the Google Groups "dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dropwizard-us...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Trevor Mack

unread,
Jan 19, 2017, 11:31:15 PM1/19/17
to dropwizard-user
If a bunch of people are just adding this functionality should we look at adding it to the source? Was there a reason not to have this helper by default in AbstractDAO?
Reply all
Reply to author
Forward
0 new messages