As in the subject said I have two tables to extend with two fields.
The first tables could I do without issue!
The second one I'm running into trouble.
I have changed the the database with UUID field and an Boolean field.
I run JooQGenerate, I see in the generated JOOQ files that the fields are
added, I see methods to get value's from another table by FK.
But if I add one field to the select query and the fetch(...) mapping, it's
compiling\running.
If add the second field to the select\mapping, I get the error Type
Mismatch required....
If I commented out one of the existing fields in the select\mapping it is
compiling again.
So it seems to me that is not direct related to the new Boolean field but
which I added as new field.
(And as said I have added these two fields to another table and is
compiling\running without issue!)
In hours I'm already I think 3 days searching and I've asked other people
but thay have no idea and I'm running out of options..., sorry, what is
this hard to find! I've no idea what is not matching: data class? database
field? the sequence of select vs. mapping (but I have checked this a few
times)? What else...
I've tried to build up the Select\mapping line by line, and than suddenly
at the list select\mapping it gives the error...
Here is my code, I hope that it gives an impression:
override fun getResultBySubject(
varId: VarId,
subId: SubId,
aId: AId
): List<DATACLASS> = usingDSL { context ->
context.select(
TABLE_X.ID.convertFrom { BId(it!!) },
TABLE_X.MAP2,
TABLE_X.MAP3.convertFrom { varId(it!!) },
TABLE_X.MAP4.convertFrom { it!!.toInstant() },
TABLE_X.function1.NAME.convertFrom { it!! }, // This is a new added
field
TABLE_X.MAP6.convertFrom { it!!.toInstant() },
TABLE_X.function2.NAME.convertFrom { it!! },
TABLE_X.MAP8.convertFrom { it!! }, // And this is a new
added field.
TABLE_X.MAP9.convertFrom { it!! },
TABLE_X.MAP10.convertFrom { it!! },
TABLE_X.MAP11.convertFrom { note -> note?.let { RichText(it) } },
TABLE_X.MAP12.convertFrom { it!! },
fuction3(alias = TABLE_X.function),
TABLE_X.MAP14,
TABLE_X.MAP15,
TABLE_X.MAP16.convertFrom { value -> value?.let { RichText(it) } },
TABLE_X.MAP17.convertFrom { record -> record.id?.let { function(record) } },
TABLE_X.MAP18,
TABLE_X.MAP19,
function3(alias = TABLE_X.field),
DSL.row(
TABLE_X.hhrHhiType.ID,
TABLE_X.hhrHhiType.NAAM,
).mapping { id, naam -> id?.let { HhiType(HhiTypeId(it), naam!!) } },
TABLE_X.MAP22,
function(TABLE_X.field) // SELECT FIELD 23
)
.from(TABLE_X)
.leftJoin()
.on()
.where(
)
.orderBy()
.fetch(
mapping { id, map2, map2, map3, map5, map6, map7, map8, map9,
map10, map11, map12, map13, map14, map15, map16,
map17, map18, map19, map20, map21, map22, map23 ->
if (map2)
dataMainclass(
id = map1
field2 = map2
...
)
else
dataSubclas(
dataSubclass(
id = map1
field2 = map2
...
)
)
--
You received this message because you are subscribed to the Google Groups "jOOQ
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jooq-user/c451d5b7-8099-4920-9745-45a2f9421c53n%40googlegroups.com.