We are trying to provide a way to programmatically change the fetch strategy being utilized. We found this to be easy enough with the Criteria API. I know there is no way to specify subselect this way, so I tried to set fetch=subselect in my mapping file under the impression that the client app could simply pass in FetchMode.SELECT, JOIN, or DEFAULT to specify which mode to use. This works fine when specifying JOIN. Also, specifying DEFAULT does result in subselect, however, when choosing SELECT, we still get a subselect. It's like the select mode won't override subselect. Is this the correct behavior and if so, is there anything we can do to make it possible for the client app to specify all three fetch modes?
|