Project an Entity from a relationship with Hibernate Criteria
I'm having trouble getting a list of related entity objects as the result of a criteria expression. I have two objects with a many to many relationship such that ObjectA <-> ObjectB where a single instance of ObjectA can be tied to a multiple instances of ObjectB, and an instance of ObjectB maybe tied to multiple instances of ObjectA. This relationship is stored in your typical join table, but for legacy reasons the object model is such that ObjectB has no direct knowledge of it's relationship to ObjectA. I'm trying to create a criteria expression to get all of the instances ObjectB that are