【发布时间】:2019-07-14 20:12:57
【问题描述】:
我正在尝试实现一个 jOOQ RecordUnmapper 来调整我稍后将插入/更新的记录。
我在下面的尝试,问题是无法实例化Record 类。如何创建Record 对象?另外,如何在insert/update中使用unmapper?
public class TableUnmapper implements RecordUnmapper<Table, Record> {
@Override
public Record unmap(Table t) throws MappingException {
Record r = new Record(); // <-- this line does not compile
r.from(t);
r.set(TABLES.TITLE_FONT_FAMILY, t.getTitleFont().getFontFamily());
return r;
}
}
【问题讨论】: