Unfortunately, there is (currently, as in jOOQ 3.2), there is no way to print column dereferencing types Ifrom your view e, since the Java compiler does not know that the Icolumn exists . You will have to resort to unsafe methods:
.join(e)
.on(s.NAME.equal(e.field("I").coerce(String.class))
.join(e)
.on(s.NAME.equal((Field) e.field("I")))
Slightly more types of security can be achieved by reusing the field Ias such:
Source s = SOURCE.as("s");
Field<String> I = SOURCE.ID.as("I");
TableLike<?> e = create.select()
.from(SOURCE)
.where(SOURCE.NAME.isNotNull())
.asTable().as("e");
create.selectCount()
.from(s)
.join(e)
.on(s.NAME.equal(e.field(I)))
.fetchOne().value1();