Im using hibernate search 3.1
Im trying to create an index using @Inheritance.
Principal class:
Code:
@Entity
@Indexed
@Table(name = "iapol.rrhh_solicitud_licencia")
@SequenceGenerator(name = "seq_rrhh_solicitud_licencia", sequenceName = "iapol.seq_rrhh_solicitud_licencia")
public class SolicitudLicenciaEnt implements Serializable, SolicitudLicencia {
private static final long serialVersionUID = -2831177010189116163L;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_rrhh_solicitud_licencia")
@Column(name = "id", nullable = false)
private Long id;
@IndexedEmbedded
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "id_usuario", nullable = false)
public AgenteEnt agente;
.......
getters and setters
.......
}
extended Class agenteEnt
Code:
@Entity
@Table(name = "iapol.per_agentes")
@Inheritance(strategy = InheritanceType.JOINED)
public class AgenteEnt extends UsuarioEnt implements Agente, Serializable {
......
......
......
}
Base classs
Code:
@Entity
@Table(name = "iapol.per_usuario")
@Inheritance(strategy = InheritanceType.JOINED)
@SequenceGenerator(name = "per_sq_usuario", sequenceName = "iapol.per_sq_usuario")
public class UsuarioEnt implements Usuario, Serializable {
private static final long serialVersionUID = 3570278684052360798L;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "per_sq_usuario")
@Column(name = "id", nullable = false)
protected Long id;
@Field(index = Index.TOKENIZED, store = Store.NO)
@FieldBridge(impl = StringTildesBridge.class)
@Column(name = "username", nullable = false, unique = true)
protected String username;
..........
............
.................
No index is create when I try to create principal class index (solicitudLicenciaEnt index). agente.username is no getting indexed