문제

I'm doing an org.hibernate.tool.hbm2dll.SchemaExportTask as part of my compile/build script (it is ant with hibernate4 plugin, if it is important).

Everything works wonderfully, except one:

It destroys all data!

What I want, is realistically a simple database dump, an equivalent of "pg_dump --all" or like. It doesn't matter, if it is based on the xml configuration, or on the current database.

I don't want any modification on the real db, and particularly don' want any actually executed drop/create operations.

Is it possible anyhow in the sphere of the hibernate tools jars?

도움이 되었습니까?

해결책

Ok, I solved this. Not the hibernate tools did the db-destroy, but hibernate at initialization. Setting hibernate.hbm2dll.auto to update fixed everything.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top