2 tables, Object and Tag, that are related through Object.tag_id = Tag.id. An Object may have a Tag, or not.
Record record = getDslContext()
.select(OBJECT.OBJECT_ID, OBJECT.ALIAS)
.select(TAG.TAG_ID, TAG.TAG_LABEL)
.from(OBJECT)
.leftJoin(TAG).onKey()
[.......]
.fetchOne();
TagRecord tag = record.into(TagRecord.class);
In the case where the queried Object has no Tag, when I map the result into a TagRecord, I happen to get a TagRecord instance tag with null fields (further, if Tag would contain primitive data types, they would be filled with the default value).
I would expect to get tag==null directly..
Is it possible to have such behaviour?