The problem has been fixed with version 2.8.0.Final.
Using the above commands now generates a loop allowing me to select from a list of
tables. Once selected, the table is removed from the list and the list redisplays until I
enter nothing (hit return only). The entities are then generated. The man page for
jpa-generate-entities-from-tables only documents the targetPackage parameter (I guessed
the remaining parameters from other commands).
Is there a parameter that will automatically select all tables from the specified database
schema ?
Below is an example of the output of jpa-generate-entities-from-tables:
jpa-generate-entities-from-tables - --targetPackage ca.gerrymatte.par.model
--hibernateDialect MySQL5\ with\ InnoDB\ :\ org.hibernate.dialect.MySQL5InnoDBDialect
--driverC lass com.mysql.jdbc.Driver --driverLocation C:/s/jclasses/drivers/mysql.jar
--userName root --userPassword matteg --jdbcUrl
jdbc:mysql:///par?characterEncoding=UTF-8&characterSetResults=
UTF-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull ; log4j:WARN No
appenders could be found for logger
(org.hibernate.cfg.reveng.dialect.MySQLMetaDataDialect). log4j:WARN Please initialize the
log4j system properly. [0] - activities [1] - clients [2] - companies [3] - daybook [4] -
loglines [5] - logsessions [6] - people [7] - roles [8] - staff [9] - timeservices [10] -
timesheetofficeonly Database Tables (The database tables for which to generate entities):
[0-10] 6 [0] - activities [1] - clients [2] - companies [3] - daybook [4] - loglines [5] -
logsessions [6] - roles [7] - staff [8] - timeservices [9] - timesheetofficeonly Database
Tables (The database tables for which to generate entities): [0-9] 6 [0] - activities [1]
- clients [2] - companies [3] - daybook [4] - loglines [5] - logsessions [6] - staff [7] -
timeservices [8] - timesheetofficeonly Database Tables (The database tables for which to
generate entities): [0-8] ***SUCCESS*** 2 entities were generated in
ca.gerrymatte.par.model [persistence.xml]$
Posted by forums
Original post:
https://community.jboss.org/message/901463#901463