Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

229
Views
JOOQ -> Convert alias to datatype

I have a query that returns a field of type array, and I used .as('Names'), to give it an alias. Now I need to assign this to a class. How can I convert the AliasField to datatype MutableSet?

I tried doing:

 myClass.names = record.get("Names", MutableSet::Class.java)

But this is of type mutableSet<*>! , I'll need to convert it a nullable type to MutableSet?.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Just keep a reference to your field expression and use that to read values from the record, e.g.:

val names = MY_COLUMN.as("names")
val record = ctx.select(names).from(...).fetchOne()
myClass.names = record.get(names)
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!