Hi,
I have a graph like that:
user -> blocks -> blockDetails
A user has a colelction of blocks and each block has a collection of blockDetail
Code:
class User {
public Collection blocks;
}
class Block {
public Collection blockDetails;
}
class BlockDetail {
}
I would like to change the fetchMode to JOIN of each relation at runtime using the Criteria API:
Code:
criteria.setFetchMode("blocks", FetchMode.JOIN).addCriteria("blocks", "block").setFetchMode("blockDetails", FetchMode.JOIN);
It doesn't seem to work with more than one relation level.
It is possible to go till the deepest collection using Criteria??
thanks
Bruno