Hi,
I see you want to map the ChildEntity class to a Lucene Document, and you want to add fields with datas from the ParentEntity, right?
So, basically you can add the getter for the ParentEntiti name to the ChildEntity, to make it goes into the Lucene Index, like this:
Code:
@Entity
@Indexed(index="luceneIndex/test")
public class ChildEntity {
// ..
// stuff in your previous message
// ..
@Transient
@Text(name="name")
protected String getName() {
return this.parent.getName()
}
}
@Transient is needed otherwise this property gets mapped into the database also.
I know, it's a little hack, but it works :-)