Hi,
I have a question about Hibernate and PostgreSQL concerning the creation of non-existing databases. Does Hibernate automatically create the scheme of a database if not existed on the PostgreSQL-Server? I have set:
- hibernate.hbm2ddl.auto create
- hibernate.hbm2ddl.auto create-drop
- hibernate.hbm2ddl.auto update
but always get:
ERROR - could not get database metadata org.postgresql.util.PSQLException:Backend could not start: FATAL: database "dbname" does not exist.
Or does Hibernate only creates schemes for embedded db-applications?
Greetings...
p.s. this is my hibernate.properties:
show_sql true
transaction.factory_class org.hibernate.transaction.JDBCTransactionFactory
hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider
hibernate.dialect org.hibernate.dialect.PostgreSQLDialect
hibernate.connection.driver_class org.postgresql.Driver
hibernate.connection.url jdbc:postgresql://localhost/eventuser_serverclient
hibernate.connection.username postgres
hibernate.connection.password postgres
hibernate.query.substitutions yes 'Y', no 'N'
hibernate.connection.pool_size 2
hibernate.hbm2ddl.auto create
hibernate.hbm2ddl.auto create-drop
hibernate.hbm2ddl.auto update
hibernate.order_updates true
hibernate.max_fetch_depth 1
hibernate.default_batch_fetch_size 8
hibernate.jdbc.batch_versioned_data true
hibernate.jdbc.use_streams_for_binary true
hibernate.cache.region_prefix hibernate.test
|