[hibernate-issues] [Hibernate-JIRA] Resolved: (HSEARCH-158) QueryLoader, 'load' fails to load Objects that 'get' can load
Emmanuel Bernard (JIRA)
noreply at atlassian.com
Thu Feb 28 19:53:33 EST 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Bernard resolved HSEARCH-158.
--------------------------------------
Resolution: Rejected
You misunderstand the Hibernate Search internals. Pagination is taking care of at a different level of the code (upfront)
> QueryLoader, 'load' fails to load Objects that 'get' can load
> -------------------------------------------------------------
>
> Key: HSEARCH-158
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-158
> Project: Hibernate Search
> Issue Type: Bug
> Environment: mysql 5.0.27 (sorry), linux, windows, hibernate 3.2.5ga
> Reporter: Jason Eacott
>
> I noticed some odd results so I set up a test:
> from my test (using spring)
> for the same id:
> this works - 1 result as expected.
> SELECT * FROM contents where id='..';
> this fails:
> return (FeedItem) getHibernateTemplate().load(FeedItem.class, id);
> this works:
> return (FeedItem) getHibernateTemplate().get(FeedItem.class, id);
> why should this forum care?
> because in search.engine.QueryLoader this code fails to load data that clearly exists. I stepped through it and its perfect until the load clause:
> ---------------
> //mandatory to keep the same ordering
> List result = new ArrayList(entityInfos.length);
> for (EntityInfo entityInfo : entityInfos) {
> Object element = session.load( entityInfo.clazz, entityInfo.id );
> if ( Hibernate.isInitialized( element ) ) {
> //all existing elements should have been loaded by the query,
> //the other ones are missing ones
> result.add( element );
> }
> }
> ---------------
> is this a hibernate bug? and/or should hibernatesearch use session.get instead to work around the problem?
--
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