]
Emmanuel Bernard updated HSEARCH-109:
-------------------------------------
Fix Version/s: 3.0.0.cr1
This might be due to a different cause.
Lazy loaded entity could not be indexed
---------------------------------------
Key: HSEARCH-109
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-109
Project: Hibernate Search
Issue Type: Bug
Components: engine
Affects Versions: 3.0.0.beta4
Environment: Hibernate 3.2.4
J2SE5, J2SE6
MySQL 4, MySQL 5
Reporter: Alexander Chebanenko
Fix For: 3.0.0.cr1
Original Estimate: 4 hours
Remaining Estimate: 4 hours
When lazy-loading an entity it could not be indexed. Example:
Query query = ftSession.createQuery("from Entity");
for(Iterator it=query.iterate(); it.hasNext(); ) {
Entity entity = (Entity) it.next();
ftSession.index(entity);
}
When query is lazy and entityes are proxied, documents will be created with
"_hibernate_class" field set to proxy class, not entity class. It happens
because of the bug in DocumentBuilder.getDocument method. This method takes
entity.getClass() for indexing, not Hinernate.getClass(entity) as it might be expected.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: