Hi
I'm using latest hibernate (4.1.7) and hibernate-search (4.1.1)
and i'm trying to index an entity containing another embedded
entity with inheritance.
Model is:
Code:
@Entity
@Indexed
public class Store {
@Id
private long id;
@Field
private String location;
@IndexEmbedded
private Product product;
}
@Embeddable
public abstract Product {
@Id
private long id;
}
@Embeddable
public class Book extends Product {
@Field
private String name;
}
@Embeddable
public class Movie extends Product {
@Field
private String title;
}
Only Store is indexed. The problem is that Store#pruduct in
not indexed and the only field present in lucene index are:
_hibernate_class
id
location
but "product.id" and "book.name" or "movie.title" are missing
depending on Store#product type.
Any clue about this problem ?