问题:
I am wondering if it is possible using annotations to persist the attributes
map in the following class using JPA2 我想知道是否可以使用注释使用JPA2在以下类中保留attributes
映射
public class Example {
long id;
// ....
Map<String, String> attributes = new HashMap<String, String>();
// ....
}
As we already have a pre existing production database, so ideally the values of attributes
could map to the following existing table: 由于我们已经有一个预先存在的生产数据库,因此理想情况下, attributes
值可以映射到以下现有表:
create table example_attributes {
example_id bigint,
name varchar(100),
value varchar(100));