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

Add Queries DSLContext.ddl(Schema), ddl(Table) and others to re-generate known artefacts #3160

Closed
lukaseder opened this issue Mar 29, 2014 · 3 comments

Comments

@lukaseder
Copy link
Member

Given all the known meta information jOOQ has from the code generator, test databases could be generated using

Queries queries = ctx.ddl(mySchema);

See also:
http://stackoverflow.com/q/22729855/521799

@lukaseder
Copy link
Member Author

We don't have enough DDL support yet to implement this correctly

@lukaseder lukaseder changed the title Add Query[] DSLContext.ddl(Schema), ddl(Table) and others to re-generate known artefacts Add Queries DSLContext.ddl(Schema), ddl(Table) and others to re-generate known artefacts Feb 4, 2016
lukaseder added a commit that referenced this issue Feb 5, 2016
@lukaseder lukaseder mentioned this issue Nov 3, 2016
9 tasks
@oleg-smith
Copy link

@lukaseder could you tell how to make generator reflect auto_incremented field? 3.9.1 does not do it for mysql table
CREATE TABLE test ( id BIGINT(20) PRIMARY KEY NOT NULL AUTO_INCREMENT )

When I call jooq.ddl(TEST) it does not put AUTO_INCREMENTED clause as this is not included in the generated code.

@lukaseder
Copy link
Member Author

@oleg-smith: Unfortunately, this currently isn't possible in jOOQ 3.9 due to a lack of meta data information in the generated model. It will be part of jOOQ 3.10:

A workaround would be to use a post-processor on the generated code, adding the .identity(true) call on the relevant data type definitions...

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

No branches or pull requests

2 participants