I have a device table which defines the device entity:
device:
id:
type:
And I have a attribute table which records the device's attributes:
device_attr:
device_id:
key:
value:
How can I write the mappers to save the device POJO into the table and how to load the attributes into the POJO? thanks.
Pivot function may meet this, but, mysql doesnt support it, and it's performance is not good.