Can I generate a simple POJO per table via jOOQ?

46 Views Asked by At

I can easily generate record classes (e.g. UserRecord with all the fields and getter/setter ...).

But I need a simple POJO or a record with only data fields of the table (so that I can easily serialize/deserialize the data when communicating with another layer).

Is that possible via jOOQ?

1

There are 1 best solutions below

0
On

Found it. You need to add these inside generate tag in pom.xml:

<pojos>true</pojos>
<pojosAsJavaRecordClasses>true</pojosAsJavaRecordClasses>