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

Specify schema #13

Open
CodingBash opened this issue Jan 14, 2019 · 8 comments
Open

Specify schema #13

CodingBash opened this issue Jan 14, 2019 · 8 comments

Comments

@CodingBash
Copy link

In the entityGenConfig.yml, I would like to be able to provide one or more schema to model entities from. As the complement, a feature to ignore specified schema would also be very helpful.

Motivation: Wanting to ignore all tables in the postgresql information schema.

Thanks!

@seratch
Copy link
Collaborator

seratch commented Feb 18, 2019

@CodingBash I guess you can give currentSchema in the JDBC URL. Does this answer make sense?
https://jdbc.postgresql.org/documentation/head/connect.html

@grgouveia
Copy link

I'm having the same issue.
Even tough I set the currentSchema in the url, entityGen searches for the tables in information_schema

@karsany
Copy link
Contributor

karsany commented Jul 30, 2019

pull request #26, but just one schema

@abccbaandy
Copy link

abccbaandy commented May 21, 2020

does this support mysql?
I tried schemaPattern but no luck, it still fetch all table.

according this:
https://stackoverflow.com/questions/2780284/how-to-get-all-table-names-from-a-database

maybe we need pass the category arg here?
https://github.com/smartnews/jpa-entity-generator/blob/master/src/main/java/com/smartnews/jpa_entity_generator/metadata/TableMetadataFetcher.java#L34

@seratch
Copy link
Collaborator

seratch commented May 21, 2020

This library supports MySQL but I'm not sure if it works with newer versions of the MySQL JDBC driver. It surely works with mysql-connector-java 5.x https://github.com/smartnews/jpa-entity-generator#for-maven-users

@abccbaandy
Copy link

abccbaandy commented May 21, 2020

It work, but it fetch all the tables in the mysql instance. But I only want it fetch the database I choose.
ex:
jdbc:mysql://localhost:3306/mytest

It should only fetch tables in mytest.

@GaetanoPiazzolla
Copy link

IS this project still mantained?
I'm having the same issue and I want to provide a solution for this.

@seratch
Copy link
Collaborator

seratch commented Oct 24, 2020

I left this company two years ago and I'm not using this tool at work (my current role is not backend engineer). So, I'm not actively updating the library anymore.

But I'm happy to review code changes and still have the permission to release new versions. If you can help us resolve this issue, it'd be greatly appreciated.

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

6 participants