Java Mailing List Archive

http://www.gg3721.com/

Home » Hibernate Issues List »

[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3402)
Order.ignoreCase() doesn't work

Anupam M (JIRA)

2008-07-28


Author LoginPost Reply
Order.ignoreCase() doesn't work
--------------------------------

          Key: HHH-3402
          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3402
        Project: Hibernate3
      Issue Type: Bug
      Components: query-criteria
  Affects Versions: 3.2.5
     Environment: oracle10g
       Reporter: Weipeng Wang


This is my My User.hbm.xml:
<class name="User"
   table="USERS" schema="TEST" dynamic-insert="true"
   dynamic-update="true" lazy="true">
<id name="id" type="long">......</id>

<property name="title" type="string">
 <column name="TITLE" />
</property>

<property name="keyword" type="string">
 <column name="KEYWORD" />
</property>

<component name="auditInfo"
 class="AuditInfo">
 <property name="auditStatus"
   type="string">
   <column name="AUDITSTATUS" />
 </property>

 <property name="auditTime" type="timestamp">
   <column name="AUDITTIME" />
 </property>

 <many-to-one name="auditUser" column="AUDITMEMBER"
   class="Member." lazy="proxy" />
</component>
 ... ... ...
</class>

AuditInfo.java is a value type, Member.java is another entity

my code fragment as follow:
....
DetachedCriteria detachedCrit = DetachedCriteria.forClass(persistentClass);
Example example = Example.create(exampleInstance);

detachedCrit.add(example) .addOrder(Order.asc("title").ignoreCase())
.addOrder(Order.asc("keyword").ignoreCase())
.addOrder(Order.asc("auditInfo.auditStatus").ignoreCase());
...

the sql on the console as follow :
select .... from  
       USERS this_,
       ...
    where
      ...
    order by
       lower(this_.TITLE) asc,
       lower(this_.KEYWORD) asc,
       this_.AUDITSTATUS asc

all code run well except the last ignoreCase() !

--
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

   
_______________________________________________
hibernate-issues mailing list
hibernate-issues@(protected)
https://lists.jboss.org/mailman/listinfo/hibernate-issues
©2008 gg3721.com - Jax Systems, LLC, U.S.A.