Question

I have an embedded Derby DB and work with hibernate. In my config file I use create but I also tried create-drop. The problem is, that drop table if exists fails at the beginning of my hibernate test and I had changed the mapped classes so that i.e. some not null fields don't exists anymore. Thus there is everytime a failure that I can't save null in this field. How can I get rid of this problem? I thought of some solutions but I don't know how to do these. The 1st solution I considerd was that I deleted the embedded Derby DB and start by zero, which isn't a problem but I don't know how to do it. My 2nd solution was that I changed to create-drop and ran the test without any db communication so that the schema get dropped at the end, but it doesn't looked like that there was a drop schema command at the end and it didn't helped me out.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top