[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6922) The usage of Mysql DATE_SUB function

Steve Ebersole (JIRA) noreply at atlassian.com
Fri Dec 30 22:16:21 EST 2011


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

Steve Ebersole commented on HHH-6922:
-------------------------------------

HQL understands date arithmetic to an extent.  It just does not recognize the SQL keyword INTERVAL as a special token.  So if that works for your needs, then use that.

Otherwise, you can create a custom dialect and register a function that does whatever you want.

This is not a bug.  You are asking for HIbernate to do something it nevwer claimed to do.  That is by definition a request for a feature/enhancement.

> The usage of Mysql DATE_SUB function
> ------------------------------------
>
>                 Key: HHH-6922
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6922
>             Project: Hibernate Core
>          Issue Type: New Feature
>          Components: core
>    Affects Versions: 3.0 alpha
>         Environment: Hibernate 3.0 in Mysql database
>            Reporter: anoop kumar
>              Labels: hibernate
>
> There is no direct method for implementing the DATE_SUB function using hibernate CreateQuery method. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list