We use the Criteria API with OpenJPA to execute complex searches.
But currently I'm blocked and as I found nothing on the web or your site I wanted to ask you directly:
We have several Entites, let's say A, B, C
Currenlty we do a LEFT JOIN between A and B to get all A Entities even if there is no relation to B, it's working fine as expected.
Now we have another relation between B and C. B has just a String which represents the FK to C, so I wanted to join between B and C.
So without the cb.equal, A is present 1 time -> OK
But once I add an additiona comparison to one of the attributes from A, it add the Table a second time to the query, which generates a very big join and will crash our application.
So please, is this a Bug or do I use it in a wrong way?