https://github.com/forge/plugin-hibernate-tools
Database Reverse Engineering with Hibernate Tools
https://github.com/forge/plugin-hibernate-tools
Last synced: 4 days ago
JSON representation
Database Reverse Engineering with Hibernate Tools
- Host: GitHub
- URL: https://github.com/forge/plugin-hibernate-tools
- Owner: forge
- Created: 2011-04-07T15:02:39.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2014-01-08T19:58:07.000Z (about 12 years ago)
- Last Synced: 2025-09-07T02:48:53.328Z (6 months ago)
- Language: Java
- Homepage:
- Size: 451 KB
- Stars: 19
- Watchers: 12
- Forks: 10
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Hibernate Plugin for Forge
==========================
A (for now) simple plugin that makes some of the features of Hibernate Tools availabl from within forge.
Installation
============
forge install-plugin hibernate-tools
How to use
==========
Before using make sure to copy your jdbc driver to $FORGE_HOME/lib
since otherwise Forge can't connect to your database.
On a project with the persistence facet you can do:
$ generate-entities --url jdbc:hsqldb:localhost:9001 --driver org.hsqldb.jdbcDriver
and it will use JDBC to connect to the database and generate JPA entities.
Commands
========
[generate-entities] - Generate entities from a database.
[OPTIONS]
[--table] - Table pattern to include. 'CUSTOMER' for specific table, 'CUST*' for substring match and '*' for all (the default)
[--schema] - Schema pattern to include. Same syntax as for table
[--catalog] - Catalog pattern to include. Same syntax as for table
[--entityPackage] - Package to use for generated entities.
[--driver] - Class name for JDBC driver
[--url] - URL for JDBC connection
[--user] - Username for JDBC connection
[--password] - Password for JDBC connection
[--detectManyToMany] - Detect many to many associations between tables.
[--detectOneToOne] - Detect one-to-one associations between tables.
[--detectOptimisticLock] - Detect optimistic locking tables, i.e. if a table has a column named 'version' with a numeric type optimistic locking will be setup for that table.
TODO's
======
* Use "connection profiles" instead having users to specify jdbc
details everytime.
* Avoid shading so can remove the Loader class to circumvent what
looks like a bug in Weld for scanning shaded Freemarker jars.
* Add support for remaining Hibernate Tool features such as template
path, reveng.xml files and possibly alternative generation options
than just JPA entities.
* World Domination