[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-767) REGRESSION: Reindexing of @ContainedIn entities fail under certain conditions

Sanne Grinovero (JIRA) noreply at atlassian.com
Thu May 19 06:54:24 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42348#action_42348 ] 

Sanne Grinovero commented on HSEARCH-767:
-----------------------------------------

Hi Kyrill,
I've been inspecting your test carefully, thank you for that.
while I appreciate the feedback, I'm afraid I'll have to reject this issue. You should really make sure to apply changes to managed entities, what you are doing is a dangerous antipattern and you might have other issues with it.
I discussed about this with the team, and we're surprised that this worked before; we think it did because Search was quite aggressive in loading related entities, but this was a performance problem we fixed as it now only loads what's required. The definition of _what's required_ is quite explicit from the Hibernate session, sorry we can't do magic to figure out you're going other changes for which we don't receive any notification or event. If we where to inspect the whole object graph, that would make everything slower and make everybody unhappy.

So, it was never an intention to support what you where doing, it should never have worked in first place. Please fix your application by properly loading Parent2, and keep the valuable feedback we appreciate that. If you don't want to load Parent2, come to the forums we can discuss alternatives (caching would work nicely!).

> REGRESSION: Reindexing of @ContainedIn entities fail under certain conditions
> -----------------------------------------------------------------------------
>
>                 Key: HSEARCH-767
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-767
>             Project: Hibernate Search
>          Issue Type: Bug
>          Components: engine
>    Affects Versions: 3.4.0.Final
>            Reporter: Kyrill Alyoshin
>         Attachments: hibernate_search_bug.zip
>
>
> So, I've just upgraded to 3.4.0 from 3.3.0, and one of my Hibernate Search tests fails. Here is the summary.
> Let's say we have a project with two entities: Parent and Child. Let's create first Parent with a Child and a second Parent with a Child. Transaction commits. Parent is @Indexed, Child is @IndexedEmbedded. 
> Now, in a separate transaction, we retrieve the child of Parent 1, and move it to Parent 2. Parent 2 is detached (!). Parent 2 will fail to be re-indexed. Of course, if we re-associate Parent 2 with session, it will work. But it used to work without this. I've reproduced the problem in the attached test case. 
> I am really curious as what you're going to do about this bug. :-)

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