Ниже приведены мои два класса сущностей.
Первая сущность
Код: Выделить всё
@Entity
@Indexed
public class Course{
@KeywordField
@Column(unique = true)
public String id;
@GenericField
public boolean isActive;
@OneToMany(cascade = CascadeType.ALL)
@IndexedEmbedded
@IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW)
public Set localizations = new HashSet();
}
Код: Выделить всё
@Entity
@Indexed
public class Localization{
@KeywordField
public String languageStr;
@KeywordField(aggregable = Aggregable.YES)
public String localizationType="";
}
Код: Выделить всё
"localizations": [
{
"languageStr": "zh",
"localizationType": "Orginal"
},
{
"languageStr": "es",
"localizationType": "Subtitled"
},
{
"languageStr": "de",
"localizationType": "Subtitled"
},
{
"languageStr": "en",
"localizationType": "Original"
},
{
"languageStr": "fr",
"localizationType": "Subtitled"
},
{
"languageStr": "ar",
"localizationType": "Subtitled"
},
{
"languageStr": "pt",
"localizationType": "Subtitled"
},
{
"languageStr": "ja",
"localizationType": "Subtitled"
}
]
Подробнее здесь: https://stackoverflow.com/questions/787 ... ist-is-not