[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-1049) includePaths bombs on inclusion of id members

Marc Schipperheyn (JIRA) noreply at atlassian.com
Wed Mar 7 08:28:48 EST 2012


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

Marc Schipperheyn commented on HSEARCH-1049:
--------------------------------------------

You're right. SubItem should be like below with @ContainedIn. I over eagerly commented my code with all the testing. So adding, removing works now. 
With regards to the SubItem not being Indexed when MassIndexer indexes Item, this is related to your depth=0 remark. This is probably not entirely desirable but if it's not, it should be a separate Jira and is not related to this one. So, I'm good on this one. 

{code}
@Indexed
public class SubItem {

@ContainedIn
public Item getItem(){

}

@IndexedEmbedded(prefix="item.",includePaths={"id"})
public List<Item> relatedItems() {
...
}
}
{code}



> includePaths bombs on inclusion of id members
> ---------------------------------------------
>
>                 Key: HSEARCH-1049
>                 URL: https://hibernate.onjira.com/browse/HSEARCH-1049
>             Project: Hibernate Search
>          Issue Type: Bug
>          Components: engine
>    Affects Versions: 4.1.0.Beta2
>            Reporter: Marc Schipperheyn
>            Priority: Blocker
>             Fix For: 4.1.0.Final
>
>
> When I include id members on includePaths, I get 
> Found invalid @IndexedEmbedded->paths configured on class nl.project.model.Item, member subitem: item.id
> I use ids a lot and in many cases they are all I'm interested in.
> E.g.
> @IndexedEmbedded(prefix="location.",includePaths={"city.id","city.city","country.id","city.region.id"})
> 	public Address getAddress() {
> 		return address;
> 	}
> will indicate all id fields as erronous.

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