Re: Which Java persistence library would you use with PostgreSQL? - Mailing list pgsql-general

From Sumit Raja
Subject Re: Which Java persistence library would you use with PostgreSQL?
Date
Msg-id CAB4mO2e1LRy+PHAPDoq2yuLvB_yc5p-j=rQp2NmJUoi+7s-hhg@mail.gmail.com
Whole thread Raw
In response to Re: Which Java persistence library would you use with PostgreSQL?  (Bata Degen <bata42@arcor.de>)
List pgsql-general
> <property name="hibernate.connection.url"
> value="jdbc:postgresql://localhost:5432/MySampleDb"/>
>
> If you add ";create=true" just as in the example above, it breaks the code
> and you get this as a result:
>
> org.postgresql.util.PSQLException: FATAL: database "MySampleDb;create=true"
> does not exist

"create=true" is a Derby specific instruction to create the database
if it is missing., it means nothing to the Postgres driver which
rightly assumes it is the name of the database you are trying to
connect to. To create tables using Hibernate you need to set up your
Hibernate config to create the schema for you. The Hibernate docs will
give you more information - for 3.x have a look at
http://docs.jboss.org/hibernate/orm/3.3/reference/en/html/session-configuration.html#configuration-optional.

If that doesn't help, maybe the Hibernate user group is better placed
to give you more information?

- Sumit

pgsql-general by date:

Previous
From: Bata Degen
Date:
Subject: Re: Which Java persistence library would you use with PostgreSQL?
Next
From: "STERBECQ Didier"
Date:
Subject: RE : Postgres 8.x on Linux : how to use HugePages