[hibernate-dev] @IndexedEmbedded ids numeric in stead of Strings

Marc Schipperheyn m.schipperheyn at gmail.com
Wed Feb 4 13:04:02 EST 2015


I'm noticing that on @IndexedEmbedded HSearch 5, an id reference is indexed
as a numeric field, when, that same id is indexed as a string being a
@DocumentId. I had some seemingly inconsistent behaviour in my tests so now
I'm not so sure what is the intended behaviour?

So,

@Entity
@Indexed
public class Post{

   @Id
   @DocumentId
    private Long id;

    @ManyToOne
    @IndexedEmbedded(includePaths={"id"})
    private Post parent;
}

id would be a string
parent.id would be numeric

is this intended? I guess I can see the logic but it seems a little
inconsistent and something that should be mentioned in the migration guide.

Cheers,
Marc


More information about the hibernate-dev mailing list