-
1. Re: How to use Forge 2 jpa-generate-entities-from-tables ?
gerry.matte Aug 16, 2014 7:32 PM (in response to gerry.matte)Or post an example of using this command with any type of database server ?
-
2. Re: How to use Forge 2 jpa-generate-entities-from-tables ?
gerry.matte Aug 20, 2014 2:59 PM (in response to gerry.matte)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 ?
To whomever fixed this bug, thank you very much !
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 xxxxx --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]$
-
3. Re: [forge-users] How to use Forge 2 jpa-generate-entities-from-tables ?
gastaldi Aug 20, 2014 4:54 PM (in response to gerry.matte)Hi Gerry,
I am glad it works for you now. Have you tried using "*"? If that still doesn't work, please open a JIRA and we'll have a look at it asap.
Best Regards,
George Gastaldi
-
4. Re: How to use Forge 2 jpa-generate-entities-from-tables ?
krodneyk65 Aug 25, 2014 3:41 PM (in response to gastaldi)How do I get Forge 2.8.0 in my copy of JBoss Developer Studio
Version: 8.0.0.Beta3
Build id: Beta3-v20140722-2011-B194
Build date: 20140722-2011
Right now I have 2.7.2 and 1.4.4 runtimes. I'm new to this and I'm currently attempting the following (below) - but no entities are generated and no ERRORS are shown. I'm wonder if 2.8.0 will resolve my issue.
jpa-generate-entities-from-tables \
--hibernateDialect MySQL5\ with\ InnoDB\ :\ org.hibernate.dialect.MySQL5InnoDBDialect \
--jdbcUrl jdbc:mysql://localhost:3306/tehub --userName root --userPassword mariadb \
--driverClass com.mysql.jdbc.Driver --driverLocation C:\JBOSS\mysql-connector-java-5.1.32-bin.jar \
--targetPackage com.hp.tehub.model
Any help would be wonderful
-
5. Re: How to use Forge 2 jpa-generate-entities-from-tables ?
gastaldi Aug 25, 2014 4:22 PM (in response to krodneyk65)Hi Rodney,
You can update to the latest version by using the nightly version:
Add the following URL to your Eclipse Luna 4.4 installation, via: Help > Install New Software… > Work with:
http://download.jboss.org/jbosstools/updates/nightly/luna/
Then select the Forge Tools component.
Hope it helps!
George Gastaldi
-
6. Re: [forge-users] How to use Forge 2 jpa-generate-entities-from-tables ?
lincolnthree Sep 2, 2014 1:53 PM (in response to gastaldi)We should probably add "*" to the man page so that folks know they can
select a group of, or all, tables using the simple pattern.
On Wed, Aug 20, 2014 at 3:13 PM, George Gastaldi <ggastald@redhat.com>
wrote:
Hi Gerry,
I am glad it works for you know. Have you tried using "*"? If that still
doean't work, please open a JIRA and we'll have a look at it asap.
Em 20/08/2014, às 15:51, forge-users@lists.jboss.org escreveu:
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. - activities - clients -
companies - daybook - loglines - logsessions - people -
roles - staff - timeservices - timesheetofficeonly Database
Tables (The database tables for which to generate entities): 6 -
activities - clients - companies - daybook - loglines -
logsessions - roles - staff - timeservices -
timesheetofficeonly Database Tables (The database tables for which to
generate entities): 6 - activities - clients - companies
- daybook - loglines - logsessions - staff -
timeservices - timesheetofficeonly Database Tables (The database tables
for which to generate entities): **SUCCESS** 2 entities were
Posted by forums
Original post: https://community.jboss.org/message/901463#901463
_______________________________________________
forge-users mailing list
_______________________________________________
forge-users mailing list
https://lists.jboss.org/mailman/listinfo/forge-users
--
Lincoln Baxter, III
"Simpler is better."
-
att1.html.zip 1.6 KB
-