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

Strong Liu (JIRA) noreply at atlassian.com
Wed Sep 1 06:25:18 EDT 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=38245#action_38245 ] 

Strong Liu commented on HHH-5521:
---------------------------------

please take a look of the javadoc of javax.persistence.Temporal, and let me know if this helps, thanks

> 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

        


More information about the hibernate-issues mailing list