21 Mayıs 2018 Pazartesi

HibernateSearch @IndexedEmbedded Anotasyonu

Giriş
Açıklaması şöyle.
This annotation is used to index associated entities (@ManyToMany, @*ToOne, @Embedded and @ElementCollection) as part of the owning entity. This is needed since a Lucene index document is a flat data structure which does not know anything about object relations.
Örnek
Şöyle yaparız.
public class Eventinfo implements Serializable {

  @IndexedEmbedded
  private Set<EventLicenseType> eventLicenceTypeIds;
  ...
}

Hiç yorum yok:

Yorum Gönder