saboya / gorm-logical-delete

Database-agnostic logical delete for Grails.
http://saboya.github.io/gorm-logical-delete
Apache License 2.0
1 stars 1 forks source link

PreQueryListener.onApplicationEvent not being fired #4

Open danlobo opened 8 years ago

danlobo commented 8 years ago

The deleted property is working fine, but the listener event is not being fired before the queries, so a call to

Domain.list() or Domain.findAll()

will return all items, including the deleted ones. A

Domain.findAllByDeleted(false)

call will bring the correct results. (Breaking the plugin transparency, though).

Using hibernate4:5.0.0-RC1, grails:2.5.4 and gorm-logical-delete:1.1

saboya commented 8 years ago

Thanks, I'm gonna have a look at it.

saboya commented 8 years ago

Well, from the looks of it Hibernate uses its own session handler and also it's own domain base class, no wonder this doesn't work. I had no idea, this makes no sense to me... I'm gonna see if I can work around this somehow, but basically it shouldn't work at all :/

mithom commented 8 years ago

@saboya ,I see this is a raher new plugin. But i'm wondering: are you still working on this project? i would love to use this plugin and I would even wait for it's completion if you are still working on this and thus fixing a huge bug like this one. Already great job so far, if this could be fixed it would be awesome!