我正在使用orm.xml,不知道如何添加一些可嵌入对象的集合。
实体:
class User:
private final Set<MovieSourceId> favourites;
orm.xml文件:
<entity class="io.github.mmpodkanski.auth.User" access="FIELD">
<table name="users"/>
<attributes>
<embedded name="sourceId"> #<------------------- there I want Set of MovieSourceId
<attribute-override name="id">
<column name="source_id"/>
</attribute-override>
</embedded>
</attributes>
</entity>
<embeddable class="io.github.mmpodkanski.auth.vo.MovieSourceId" access="FIELD">
<attributes>
<basic name="id">
<column nullable="false"/>
</basic>
</attributes>
</embeddable>
暂无答案!
目前还没有任何答案,快来回答吧!