Issue Type: Task Task
Assignee: Strong Liu
Components: metamodel
Created: 26/Jan/13 11:23 AM
Description:

org.hibernate.test.filter.hql.JoinedFilteredBulkManipulationTest fails due to the wrong condition of filter defined in the hbm.

The filter-def element in hibernate-mapping xsd is defined as follow:

<xs:complexType mixed="true" name="filter-def-element">
        <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <!--
                              FILTER-PARAM element; qualifies parameters found within a FILTER-DEF
                              condition.
                          -->
            <xs:element name="filter-param" type="filter-param-element"/>
        </xs:sequence>
        <xs:attribute name="condition" type="xs:string"/>
        <xs:attribute name="name" use="required" type="xs:string"/>
        <!-- The filter name -->
    </xs:complexType>

this has mixed=true since the condition can be defined with condition attribute or just text within this element.

but after the hbm.xml parsed by JAXB, even the xml is defined as below:

<filter-def name="sex" condition="SEX_CODE = :sexCode">
        <filter-param name="sexCode" type="char"/>
    </filter-def>

the mixed content ( ` filterDefElement.getContent()` ) returns an "\n "

which we should really check the trimmed string instead the raw one

I think this rule applies to all xsd elements with mixed set to true

Fix Versions: 5.0.0
Project: Hibernate ORM
Priority: Major Major
Reporter: Strong Liu
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira