Hardy Ferentschik edited a comment on Bug HSEARCH-1108

As far as I remember, programmatic API creates Annotations (with AnnotationFactory) and works like you annotate your Entities in your source.

ex:

@MappedSuperclass 
public class Foo {
  @Basic
  public String foo;
}

@Entity 
public class Bar extends Foo {
  @Basic
  public String bar;
}

So you have to...

searchMapping.entity(Foo.class).property("foo", ElementType.FIELD).field(); 

searchMapping.entity(Bar.class).indexed().property("bar", ElementType.FIELD).field();

As far as I know, per Entity Mapping is currently not possible. So if you have another Entity, ex 'Baz extends Foo', Baz inherits Foo mappings. The same for Embeddable classes.

It would be a nice if programmatic API could manage inherited properties (from MapperSuperclass and Embeddable) per Entity... but I'm afraid that this is a big change...

Please feel free to clarify if I'm wrong.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira