Java Mailing List Archive

http://www.gg3721.com/

Home » Hibernate Issues List »

[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5521)
HqlSqlWalker transforms two same HQL-Query-trees with "java.util.Date"
attribute casted as "date" different.

Anupam M (JIRA)

2010-09-01

Replies: Find Java Web Hosting

Author LoginPost Reply
HqlSqlWalker transforms two same HQL-Query-trees with "java.util.Date" attribute casted as "date" different.
------------------------------------------------------------------------------------------------------------

          Key: HHH-5521
          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5521
        Project: Hibernate Core
      Issue Type: Bug
      Components: core, query-hql
  Affects Versions: 3.3.1
     Environment: Eclipse, PostgreSQL DB Server 8.3,
Hibernate Annotations 3.4.0.ga,
Hibernate Commons-Annotations-3.4.0.ga,
Hibernate Core-3.3.1.ga,
Hibernate EntityManager 3.4.0.ga
Hibernate Search 3.1.0.ga
Hibernate Validator 3.1.0.ga
       Reporter: Thomas Quathamer
     Attachments: ASTDumpComp.txt, ASTDumpHoli.txt, ISSUE20100831.7z

Hi,
we have two classes with same attribute "Date modifiedDate".

Example Query:
OK:    SELECT name FROM Company entity WHERE CAST(entity.modifiedDate AS date) != current_date()    
ERROR:  SELECT name FROM Holiday entity WHERE CAST(entity.modifiedDate AS date) != current_date()

Executing the above HQL-queries results in different AST-Nodes for the WHERE clause,
see the two appended AST_LOG files with the node trees
(line 50 in ASTNodeDump_ObjectHoliday marked by me as ERROR).

There is a DotNode instead of an IdentNode in AST_LOG for "java.util.Date" attribute casted as "date".

Where is the differenz?


Thanks, Thomas Quathamer

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