A many-to-many relation between class A and class B is annotated with FetchType.EAGER and a @Where that limits what of the entries from table B that should be included depending on if property in B is null.
For HSQL it generates something like this
A., A_TO_B., B.*
LEFT OUTER JOIN A_TO_B ON A.id=A_TO_B.a_id
LEFT OUTER JOIN B ON A_TO_B.b_id=B.id AND (B.SOME_PROPERTY IS NULL)
A.id = ?
which works correctly, but for oracle9 we get this
A., A_TO_B., B.*
A, A_TO_B, B
A.id = A_TO_B.a_id
AND A_TO_B.b_id = B.id
AND ( B.SOME_PROPERTY IS NULL )
AND calendar_event.id = ?
Which makes em.find(A.class, idForAnExistingA) return null if there only is Bs with someProperty=null in the database for the given A (no rows returned from the query).
Not sure how to make a runnable testcase, attached a maven project with annotated classes and code that describes the steps to reproduce but is not runnable as is.
It seems like jira ate some ".*":s in the select part of the queries.
Is this still an issue in 3.6.0-Beta-4?
I have a hard time trying as we're stuck with much older versions of hibernate (shipped with JBoss 4.2.x series).
Is this a known problem in versions before 3.6?
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.
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!