[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2950) Add the ability for filters to cause columns to be retrieved or set in sql only when enabled through mappings

Keith Garry Boyce (JIRA) noreply at atlassian.com
Thu Nov 15 07:50:29 EST 2007


Add the ability for filters to cause columns to be retrieved or set in sql only when enabled through mappings
-------------------------------------------------------------------------------------------------------------

                 Key: HHH-2950
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2950
             Project: Hibernate3
          Issue Type: Improvement
    Affects Versions: 3.2.2
            Reporter: Keith Garry Boyce


I need the abiltity to be able to protect certain columns from view or update unless a H3 filter is enabled. This is for security reasons. I propose a tag like include-unless shown below that can be applied to column. On retrieval if that filter is not enabled then the value of that column will not be retreived and on attempt to persist that data then that column will not be saved if it was not included on the db retrieve or if the filter is enabled. Here is an example

<hibernate-mapping>
    <class name="com.xxx.Status" table="STATUS">
        <id name="statusId" type="big_decimal">
            <column name="STATUS_ID" precision="38" scale="0" />
            <generator class="assigned" />
        </id>
        <property name="lastName" type="string">
            <column name="LAST_NAME" length="20" not-null="true" include-unless="myRestrictedFilter">
            </column>
        </property>

This mapping would result in the following if myRestrictedFilter was enabled:

select from db would not include column LAST_NAME and update  would not include column LAST_NAME


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list