Iterating a joined-subclass query

Description

In a joined-subclass structure when trying to use query.iterate(), to use cache and lazy, hibernate translate the query "from Activation activation where activation.class = Activation" to an mal-formed SQL query. The SQL query string that it creates is "select activation0_.id as col_0_0_ from activation activation0_ where case when activation0_1_.fk_id_activation is not null then 1 when activation0_.id is not null then 0 end=0".

Attachments

3

Activity

Brett MeyerJuly 8, 2014 at 3:10 PM

Bulk rejecting stale issues. If this is still a legitimate issue on ORM 4, feel free to comment and attach a test case. I'll address responses case-by-case. Thanks!

Brett MeyerApril 7, 2014 at 5:45 PM

In an effort to clean up, in bulk, tickets that are most likely out of date, we're transitioning all ORM 3 tickets to an "Awaiting Test Case" state. Please see http://in.relation.to/Bloggers/HibernateORMJIRAPoliciesAndCleanUpTactics for more information.

If this is still a legitimate bug in ORM 4, please provide either a test case that reproduces it or enough detail (entities, mappings, snippets, etc.) to show that it still fails on 4. If nothing is received within 3 months or so, we'll be automatically closing them.

Thank you!

Flavio SuguimotoOctober 10, 2006 at 3:33 PM

The test case is:

Query query = session.createQuery("from Activation activation where activation.class = Activation ");
List activation = IteratorUtils.toList(query.iterate());

All the files are attached to the issue. If you need more codes, please let me know...

Christian BauerOctober 10, 2006 at 3:05 PM

Self-contained and minimal test case please.

Rejected

Details

Assignee

Reporter

Components

Affects versions

Priority

Created October 10, 2006 at 2:32 PM
Updated July 8, 2014 at 3:10 PM
Resolved July 8, 2014 at 3:10 PM