0
多個表的數據必須映射到單個bean。將多個表數據映射到Spring中的單個bean jdbc
在這種情況下,id,name
將從其他表格中的一個表中檢索出optionList
。所以來自n個表的數據應該與單個bean相匹配。什麼是使用RowMapper or ResultSetExtractor or any alternative
的最佳方法。 BeanPropertyRowMapper和RowMapper之間的性能差異是什麼。
我的模型類是這樣的:
class Preference{
int id;
int name;
List<Option> optionList; //will be retrieved from other table.
String contactName;
String ContactTitle;
}