Skip to content
On this page

JPA Entities

java

Generate JPA @Entity classes with annotations from SQL schema

Usage

Add to your sqldoc.config.ts:

typescript
export default {
  dialect: 'postgres',
  schema: ['./schema.sql'],
  codegen: [
    {
      template: 'jpa',
      output: './generated/Models.java',
    },
  ],
}

Then run:

bash
sqldoc codegen