Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
3.1.x
Mapping documents:
generated from xdoclet
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
oracle 9i
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
i'm trying to dynamically change the fetchMode, ie.. overriding the default mapping files lazy="false" to be true for some queries.
using the criteria API, there seems to be no magic combination that will have any effect on the default settings in the mapping files.
i have a Parent object with a list of Child objects
using:
session = sessionFactory.openSession();
Criteria sessionCriteria = criteria.getExecutableCriteria(session);
sessionCriteria.setFetchMode("child",FetchMode.SELECT);
return sessionCriteria.list();
setting the fetchmode to ANY of the available options seems to have NO effect stopping the child list from loading.
i've tried setFetchMod("Parent.child",FetchMode.SELECT);
even setFetchMod("foobar",FetchMode.SELECT) has no effect or even an error message.
has anyone got this to work? please help!
g