views:

392

answers:

1

I have in my mapping an association to an eagerly loaded collection (lazy="false" fetch="subselect"). How can I turn that off programmatically with Hibernate when I do a query?

Thanks

+1  A: 

Hi.

In fact, it is supposed to be the other way around. You turn it off in the mapping, and activate it on specific use cases with a "fetch" in the query.

That's the way the Hibernate team sees it. There is no way in Hibernate to create a request that specifies "no-fetch" for a property...

KLE
That's what I thought as well. I was just trying my luck if there's such a way to do it. Thanks
Franz See
You're very welcome. Is there something else that you need to consider your question as answered? I mean to accept the answer.
KLE