[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5282?page=c...
]
Ted Young commented on HHH-5282:
--------------------------------
For what it is worth, you can at least get access to the discriminator by exposing it as a
private read-only property. I wrote up an example here:
http://tedyoung.me/2011/08/08/jpa-and-hibernate-problems-with-polymorphic...
This was particularly important for me where I had to group by and order by type. It
isn't perfect, though. Note the issues described at the end of the article. But, it
works for now.
Query Parameters not supported for Entity Type Expression
---------------------------------------------------------
Key: HHH-5282
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5282
Project: Hibernate Core
Issue Type: Bug
Components: entity-manager
Affects Versions: 3.5.2
Reporter: Simon Martinelli
Assignee: Gail Badner
Attachments: query-test-type-expression.patch
Trying to use Entity Type Expression with query parameter result in an exception:
org.hibernate.hql.ast.QuerySyntaxException: unexpected token: : near line 1, column 90
[select k from ch.bkw.zlsc.domain.stammdaten.vse.VSEStatistikKategorie k where TYPE(k) in
:typs and k.sortierung like :keyword]
Using dynamic query instead of parameters works.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira