'jOOQ difference between Record and TableRecord

I would like to know what the difference is between a jOOQ Record and a TableRecord. So for example a User and a UserRecord. I can see that it has something to do with the actual nullability of a certain table, but why does everyone use the TableRecord and when should I ever use the normal Record?

Thanks!



Solution 1:[1]

There's a manual page about literally your question: Record vs. TableRecord. In short:

  • Record is the generic super type of all jOOQ records.
  • TableRecord is a specific type of record, which can be associated with a table in your schema. This type is typically extended by code generation output

So for example a User and a UserRecord

This might be a different question. jOOQ's code generator produces these artifacts for each table, depending on your configuration:

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1