Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out-of-the-box support for generation with DataObject-annotation #174

Open
jklingsporn opened this issue Jan 6, 2021 · 0 comments
Open

Comments

@jklingsporn
Copy link
Owner

It is not very userfriendly to create the POJOs with DataObject-annotation:

  • create a new maven module with a dependency to vertx-jooq-generate
  • create a new class that extends DelegatingVertxGenerator like this
public class ClassicReactiveVertxGeneratorWithDataObjectSupport extends DelegatingVertxGenerator {

    public ClassicReactiveVertxGeneratorWithDataObjectSupport() {
        super(VertxGeneratorBuilder.init().withClassicAPI().withPostgresReactiveDriver().build(new BuildOptions().withBuildFlags(EnumSet.of(BuildOptions.BuildFlag.GENERATE_DATA_OBJECT_ANNOTATION))));
    }
}
  • build the module
  • reference the new generator in your gradle plugin configuration
  • note: the generated classes require a dependency to the vertx-codegen-module so make sure to add that to your dependency-configuration

We should either add generators for this (easy but not very extensible) or write a simple maven/gradle-plugin on our own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant