[Newbie to Hibernate] Don't want to create table

J

John Curley

Hi, All:

I am a newbie to Hibernate. I have already created the table and I don't
want Hibernate to keep trying to create it every time I instantiate the ORM
(object-relational mapper).

By default, it keeps trying to create a table it already created. What is
the xml setting to change this?

I have looked through the documentation but haven't found anything yet.
Also, looked for examples on web.

Thanks for your help.

John Curley
 
B

Bryce

I am a newbie to Hibernate. I have already created the table and I don't
want Hibernate to keep trying to create it every time I instantiate the ORM
(object-relational mapper).

By default, it keeps trying to create a table it already created. What is
the xml setting to change this?

I have looked through the documentation but haven't found anything yet.
Also, looked for examples on web.

Look for the property hibernate.hbm2ddl.auto.

"Automatically export schema DDL to the database when the
SessionFactory is created. With create-drop, the database schema will
be dropped when the SessionFactory is closed explicitely.
eg. update | create | create-drop "

I think that's it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,135
Latest member
VeronaShap
Top