[hibernate-issues] [Hibernate-JIRA] Created: (HSEARCH-143) parent entity not reindexed when related collection marked with @FieldBridge is changed

koen handekyn (JIRA) noreply at atlassian.com
Wed Dec 12 17:29:56 EST 2007


parent entity not reindexed when related collection marked with @FieldBridge is changed
---------------------------------------------------------------------------------------

                 Key: HSEARCH-143
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-143
             Project: Hibernate Search
          Issue Type: Bug
          Components: engine
    Affects Versions: 3.0.0.GA
            Reporter: koen handekyn
            Priority: Minor


when adding/removing instances in a related collection that is marked with @FieldBridge, the parent entity does not get reindexed.
the related collection is mapped like:

  @OneToMany(mappedBy = "parentDocument", cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
  @ForeignKey(name = "FK_DOCUMENT_PROPERTIES")
  @Field(name = "property", index = Index.TOKENIZED, store = Store.NO)
  @FieldBridge(impl = PropertySetBridge.class)
  private Set<Property> properties = new HashSet<Property>();

work around is to manually trigger indexing for the entity as below: 

    document.removeLabel(label);
    entityManager.persist(document);
    getFullTextSession().index(document);

maybe the code does not see the parent entity as "dirty" ?

-- 
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