Bug 780963 (SOA-3433) - Hibernate Month Date Extraction
Summary: Hibernate Month Date Extraction
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-3433
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: EDS
Version: 5.1.0 GA
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.2.0.ER4
Assignee: Steven Hawkins
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-03 18:22 UTC by jolee
Modified: 2011-11-04 14:00 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-04 14:00:28 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 780964 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Issue Tracker SOA-3433 0 None None None Never

Internal Links: 780964

Description jolee 2011-10-03 18:22:45 UTC
Help Desk Ticket Reference: https://na7.salesforce.com/500A0000008RoC2
project_key: SOA

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.

Comment 1 jolee 2011-10-03 18:22:46 UTC
Link: Added: This issue Cloned from TEIID-1764


Comment 2 jolee 2011-10-03 18:30:51 UTC
Security: Added: Public


Comment 3 jolee 2011-10-03 18:31:47 UTC
Link: Added: This issue Cloned to SOA-3434


Comment 4 jolee 2011-10-03 18:42:24 UTC
Release Notes Text: Added: adding mapping to month attribute for Teiid Dialect


Comment 5 jolee 2011-10-03 18:43:12 UTC
Help Desk Ticket Reference: Added: https://na7.salesforce.com/500A0000008RoC2


Comment 6 Filip Nguyen 2011-11-04 14:00:28 UTC
verified in ER6, automatized hibernate_eds_month test created


Note You need to log in before you can comment on or make changes to this bug.