Java Reference
In-Depth Information
<property name="hibernate.show_sql"
value="true"/>
<property name="hibernate.format_sql"
value="true"/>
<property
name="hibernate.transaction.flush_before_completion"
value="true"/>
<property name="hibernate.dialect"
value="org.hibernate.dialect.MySQLDialect"/>
</properties>
</persistence-unit>
</persistence>
Next, we will use the generate-entities command (from the hibernate-
tools plugin) in order to generate your Entity class. You will need to provide the
following JDBC connection information:
• The JDBC URL
• The username and password
• The SQL dialect
• The JDBC Driver class name
• The path in the filesystem where the JDBC driver is located
• The package where the entities will be generated
You can specify all the parameters in a one-line command or complete it interactively
as shown in the following transcript:
[forge-demo] forge-demo $ generate-entities
? Specify the URL for the JDBC connection.
jdbc:mysql://localhost/ticketsystem
? Enter the user name for JDBC connection.
[null] root
? Enter the password for JDBC connection.
[ENTER for default] *****
? Enter the dialect to use for the datasource.
Search WWH ::




Custom Search