Skip to content

Generate entity records from an existing database schema #211

Description

@zantvoort

Storm is code-first today: you write the records and the schema has to match. Most teams that try Storm start from an existing database, and right now that means writing every record by hand.

Add generation from a live schema: connect, introspect tables, columns, primary and foreign keys, and emit Java records or Kotlin data classes annotated with @DbTable/@DbColumn/@PK/@FK, ready for the metamodel processor. JDBC metadata gets most of the way; dialect-specific type mapping fills in the rest.

The npm CLI only configures AI assistants and runs on Node, so the generator itself belongs on the JVM: a storm-codegen module with Maven plugin and Gradle task entry points, plus a runnable jar. The CLI can front it later.

Tasks:

  • storm-codegen: schema introspection and code emit, Java and Kotlin output
  • Dialect-aware type mapping, FK columns to Ref<T>
  • Maven plugin and Gradle task
  • Docs: getting started against an existing database

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions