[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-5775) Support session filters in DML statements
Strong Liu (JIRA)
noreply at atlassian.com
Wed Feb 29 03:13:48 EST 2012
[ https://hibernate.onjira.com/browse/HHH-5775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Strong Liu resolved HHH-5775.
-----------------------------
Resolution: Rejected
> Support session filters in DML statements
> -----------------------------------------
>
> Key: HHH-5775
> URL: https://hibernate.onjira.com/browse/HHH-5775
> Project: Hibernate ORM
> Issue Type: Improvement
> Components: core, query-hql
> Reporter: Jason Clawson
>
> We are using filters to support multi-tenency, an approach alluded to in this recent blog post: http://in.relation.to/Bloggers/MultitenancyInHibernate. It works create for HQL selects but doesn't work for Updates / Deletes. Looking through the source code, this seems to have been a conscious choice as some comments indicate. If filters are meant to be used for multitenency, this seems to be the wrong choice. I would like to see session filters affect updates and deletes. This seems very logical because if I run the select: SELECT * FROM User which is affected by a filter and returns 2 users, and then execute DELETE FROM User which deletes all the users in the system--- thats not what I would expect to happen.
> I believe this will require modifications to HqlSqlWalker and the ANTLR script sql-gen.g. I am looking into what other modifications are necessary, but I would appreciate it if the Hibernate folks could take a look since they would be most familiar with the code and the decisions behind it.
> Thanks!
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list