tags:

views:

70

answers:

0

Is there a way to do eager evaluations with a join table?

Let's say you have table foo, table bar, and table jbf. Table jbf is the table that joins foo and bar with a many to many relationship.

foo needs to populate it's bar member using this table. For reasons I won't go into I can't use hql and I don't want to make the getter for bar in foo always fetch eagerly.

Is there a way to do this using createSqlQuery, addEntity, and addJoin. I haven't seen any examples for this that use a join table.

Thanks Jill