]
Emmanuel Bernard resolved HSEARCH-462.
--------------------------------------
Assignee: Emmanuel Bernard
Resolution: Won't Fix
Right, bulk changes (not often used) cannot be covered by Hibernate Search transparently.
But the new mass indexing API can let you reindex the data easily when a change occurs.
Indexes are not getting updated when entity gets updated via hql.
-----------------------------------------------------------------
Key: HSEARCH-462
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-462
Project: Hibernate Search
Issue Type: Bug
Affects Versions: 3.1.1.GA
Environment: Hibernate 3.3, H-Search 3.1.1 GA, Hiberante Annotations, Oracle DB,
FSDirectoryProvider
Reporter: shareef shaik
Assignee: Emmanuel Bernard
We are using Hibernate Annotations and Hibernate Search, and to my understanding there is
no need to write listeners to update/delete index on update/delete of an entity. I tried
updating an entity via hql update, and also via persisting the entity and making changes
in it. In the second scenario, the index is getting updated, but in the first scenario it
is not. I checked for the changes in db and in both scenarios, the changes are reflected
in db. A simple test case for the same.
Case 1:
--------
String hql = "update UserMaster umst set umst.userName = :uName where umst.userId =
:uId";
org.hibernate.Query query = getSession().createQuery(hql);
query.setParameter("uName","ABM1");
query.setParameter("uId",1001L);
query.executeUpdate();
Case 2:
--------
UserMaster master = (UserMaster)getSession().get(UserMaster.class,1001L);
master.setUserName("ABM1");
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: