[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4917) Keyword TYPE not supported

Steve Ebersole (JIRA) noreply at atlassian.com
Mon Feb 22 10:49:47 EST 2010


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

Steve Ebersole commented on HHH-4917:
-------------------------------------

Well you can always build from source.

I went ahead and pushed a snapshot though.  We publish snapshots to the jboss snapshot repo @ http://snapshots.jboss.org/maven2.  The plan is to have CI push nightly snapshots

> Keyword TYPE not supported
> --------------------------
>
>                 Key: HHH-4917
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4917
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: query-hql
>    Affects Versions: 3.5.0-CR-1
>            Reporter: Juergen Zimmermann
>            Assignee: Steve Ebersole
>             Fix For: 3.5.0-CR-2
>
>          Time Spent: 5 hours, 23 minutes
>  Remaining Estimate: 0 minutes
>
> The keyword TYPE according to JPA 2 cannot be used:
> In PostgreSQL:
> CREATE TABLE kunde(
> 	k_id BIGSERIAL NOT NULL PRIMARY KEY,
> 	...
> 	art CHAR(1) DEFAULT 'P'
> );
> Entity classes:
> @Entity
> @Table(name="kunde")
> @Inheritance
> @DiscriminatorColumn(name="art", length=1)
> @NamedQueries({
> @NamedQuery(name = "typeSample",
> query = "SELECT k FROM  Kunde k WHERE TYPE(k) IN (Privatkunde, Firmenkunde)")
> })
> public abstract class Kunde implements java.io.Serializable {...}
> @Entity
> @DiscriminatorValue("P")
> public class Privatkunde extends Kunde {...}
> public abstract class Kunde implements java.io.Serializable {...}
> Wrong generated SQL query:
> select
>     ... 
> from
>     kunde kunde0_ 
> where
>     TYPE(kunde0_.k_id) in (
>         'P' , 'F'
>     )

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