Currently, jOOQ's DefaultRecordMapper either applies mapping by convention _OR_ via JPA @Column annotations. But in JPA, the @Column annotation is not mandatory on entities. If absent, default behaviour applies. jOOQ should also implement this behaviour.
See also:
Related to this, entity fields which are marked with @Column but do not have the name defined on the annotation are ignored. Not sure if this is intended behavior or not.
Current code (Tools.getAnnotatedMembers) has
if (namesMatch(name, column.name())) { // if the column annotation name field matches the reflected field name
result.add(accessible(member));
}
Thanks for the feedback, @kag0. This is not the intended behaviour. Even if jOOQ doesn't really implement JPA, it should adhere to the JPA spec where JPA annotations are interpreted.
Further, the DefaultRecordMapper should probably skip any members annotated with JPA's @Transient annotation.
Further, the
DefaultRecordMappershould probably skip any members annotated with JPA's@Transientannotation.
Can you please create a separate issue?
Can you please create a separate issue?
Done.
Most helpful comment
Done.