Mapping Files in Hibernate



Create the mapping files

Create a new file named ?hibernate.cfg.xml? in your root directory if it is not already created.

Insert the following in your hibernate file. Do not forget to change the username and the password to suit your database configuration.

PostgreSQL Version:


"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

jdbc:postgresql://localhost/firsthibernate postgres org.postgresql.Driver org.hibernate.dialect.PostgreSQLDialect p org.hibernate.transaction.JDBCTransactionFactory

thread

true


Random Posts

Post a Comment