EbeanはJPA 1.0のみをサポートし、@PrivateOwnedのようないくつかのモード注釈を追加します。残念ながら@ElementCollection
まだ(Ebean 2.8.x)がサポートされていないと、この問題のチケットがあるhttp://www.avaje.org/bugdetail-378.html
あなたが今日行うことができる唯一のことは、Stringエンティティ(文字列フィールドを持つエンティティとID)のテーブルを作成することですセットが大きすぎない場合は、文字列を1つの文字列にまとめることができます。
public String extra;
public Set<String> getExtra() {
// Split the string along the semicolons and create the set from the resulting array
return new HashSet<String>(Arrays.asList(extra.split(";")));
}
public void setExtra(Set<String> extra) {
// Join the strings into a semicolon separated string
this.extra = Joiner.on(";").join(extra);
}