Hibernate中Set类型数据的映射写法

例如private Set<String> emails = new HashSet<String>();

则在xml中写为

<set name="emails" table="t_person_emails">
            <key column="person_id"/>
            <element column="emails_name" type="string"/> 
</set>

发布了47 篇原创文章 · 获赞 7 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/floraruo/article/details/98745553