[hibernate-issues] [Hibernate-JIRA] Created: (HSEARCH-546) ProjectionLoader ignores FetchMode.JOIN set via a Criteria
Hardy Ferentschik (JIRA)
noreply at atlassian.com
Fri Jun 18 05:53:23 EDT 2010
ProjectionLoader ignores FetchMode.JOIN set via a Criteria
----------------------------------------------------------
Key: HSEARCH-546
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-546
Project: Hibernate Search
Issue Type: Bug
Components: engine
Affects Versions: 3.2.0.Final
Reporter: Hardy Ferentschik
Fix For: 3.3.0
Hibernate Search allows you to optimize the fetching strategy for association by setting an optional {{Criteria}}:
{code}
Criteria fetchingStrategy = fullTextSession.createCriteria(Foo.class);
fetchingStrategy.setFetchMode("foos", FetchMode.JOIN);
fullTextQuery.setCriteriaQuery(fetchingStrategy);
{code}
This works fine for normal queries, however, in the case of projection queries and the use of {{FullTextQuery.THIS}} the fetch mode gets ignored. This is due to the fact that the {{ProjectionLoader}} internally uses {{MultiClassesQueryLoader}} in case {{FullTextQuery.THIS}} is projected. The logic from {{FullTextQueryImpl}} deciding which entity loader to use should really also be used within {{ProjectionLoader}}.
See also {{FullTextQueryImpl.getLoader}}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list