[hibernate-issues] [Hibernate-JIRA] Issue Comment Edited: (HSEARCH-1030) Reindexing embedded Collection FieldBridge throws a LazyInitializationException and stop reindexation

Laurent Almeras (JIRA) noreply at atlassian.com
Sat Feb 11 15:15:09 EST 2012


    [ https://hibernate.onjira.com/browse/HSEARCH-1030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45489#comment-45489 ] 

Laurent Almeras edited comment on HSEARCH-1030 at 2/11/12 2:14 PM:
-------------------------------------------------------------------

Hi,

I just merge my branch and push a patch (https://github.com/lalmeras/hibernate-search/tree/HSEARCH-1030) that fixes this issue ; it is a modification on DocumentBuilderIndexedEntity that ensures that collection properties are initialized before indexation (like it is made on @Embedded collections).

It makes my test case pass, but I am sure my fix is ugly. 

Is there anyone who wants to review this bug (and my fix), and says me how it should be fixed ?

Thanks.

      was (Author: lalmeras):
    Hi,

I just merge my branch and push a patch (https://github.com/lalmeras/hibernate-search/tree/HSEARCH-1030) that fixes this issue ; it is a modification on DocumentBuilderIndexedEntity that ensures that collection properties are initialized before indexation (like it is made on @Embedded collections).

It makes my test case pass, but I am not sure it is the right approach. 

Is there anyone who wants to review this bug (and my fix), and says me how it should be fixed ?

Thanks.
  
> Reindexing embedded Collection FieldBridge throws a LazyInitializationException and stop reindexation
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HSEARCH-1030
>                 URL: https://hibernate.onjira.com/browse/HSEARCH-1030
>             Project: Hibernate Search
>          Issue Type: Bug
>         Environment: Hibernate Search 4.0
> Fedora 16
> JVM Java Sun (build 1.6.0_29-b11) 64bits
>            Reporter: Laurent Almeras
>
> When an entity owns an @IndexedEmbedded property which points to an CollectionBridge, then mass-reindex throws an LazyInitializationException and stop the whole class reindex.
> I investigate the issue, and it appears that document-builder thread only initialize first level collections, and not the 2-level depth collections indexed with a CollectionBridge.
> See https://forums.hibernate.org/viewtopic.php?f=9&t=1013886&sid=a76521d7270e1774abe236bbf6828fc6

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list