0

给定我下面的休眠文件。submit_date 列是没有时区类型的时间戳。是否可以设置仅将列值的日期部分作为日期对象或字符串的过滤器。

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping package="com.hiringsteps.ats.job.domain">
    <class
        name="Job"
        table="hs_job_master"> 

        <id name="id" column="job_id" unsaved-value="null">
            <generator class="sequence">
                <param name="sequence">hs_job_id_seq</param>
            </generator>
        </id>

        <property name="submittedDate" column="submitted_date"/>                

        <filter name="jobFilterPostDateEQ"><![CDATA[:postDateFilterEQ = submitted_date]]></filter>  
    </class>    

    <filter-def name="jobFilterPostDateEQ">
        <filter-param name="postDateFilterEQ" type="date"/>
    </filter-def>
</hibernate-mapping>
4

0 回答 0