[teiid-issues] [JBoss JIRA] Updated: (TEIID-1764) Hibernate Month Date Extraction

Andrew Block (JIRA) jira-events at lists.jboss.org
Fri Sep 30 20:43:26 EDT 2011


     [ https://issues.jboss.org/browse/TEIID-1764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Block updated TEIID-1764:
--------------------------------

    Description: 
When using teiid-hibernate-dialect-7.1.1.GA, the TeiidDialect does not include a function to get the month value of a date object. It includes functions to get other date attributes (year, dayofmonth etc). Without a defined function, attempting to get a month value falls back on the hibernate-core function which attempts to utilize an extract method which is not supported in 7.1.1. 

Example Query: select d from Data d where month(d.date)='09'

HQL Generated: 

select
        data0_.Id as Id25_,
        data0_.DataAmt as DataAmt25_,
        data0_.Data as Data25_,
    from
        Data data0_ 
    where
        extract(month 
    from
        data0_.date)='09'


Being able to obtain a month value from a date is a critical requirement.

  was:
When using teiid-hibernate-dialect-7.1.1.GA, the TeiidDialect does not include a function to get the month value of a date object. It includes functions to get other date attributes (year, dayofmonth etc). Without a defined function, attempting to get a month value falls back on the hibernate-core function which attempts to utilize an extract method which is not supported in 7.1.1. 

Being able to obtain a month value from a date is a critical requirement.



> Hibernate Month Date Extraction
> -------------------------------
>
>                 Key: TEIID-1764
>                 URL: https://issues.jboss.org/browse/TEIID-1764
>             Project: Teiid
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: 7.1.1
>            Reporter: Andrew Block
>            Assignee: Steven Hawkins
>              Labels: date, hibernate, month, query, teiid
>
> When using teiid-hibernate-dialect-7.1.1.GA, the TeiidDialect does not include a function to get the month value of a date object. It includes functions to get other date attributes (year, dayofmonth etc). Without a defined function, attempting to get a month value falls back on the hibernate-core function which attempts to utilize an extract method which is not supported in 7.1.1. 
> Example Query: select d from Data d where month(d.date)='09'
> HQL Generated: 
> select
>         data0_.Id as Id25_,
>         data0_.DataAmt as DataAmt25_,
>         data0_.Data as Data25_,
>     from
>         Data data0_ 
>     where
>         extract(month 
>     from
>         data0_.date)='09'
> Being able to obtain a month value from a date is a critical requirement.

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

        


More information about the teiid-issues mailing list