[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3402) Order.ignoreCase() doesn't work
Weipeng Wang (JIRA)
noreply at atlassian.com
Mon Jul 28 04:09:47 EDT 2008
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
More information about the hibernate-issues
mailing list