Thursday, April 19, 2012

How to exclude one table from drop-and-create-tables with Ecliselink?

I use Eclipselink 2.3.2 and want to know, if there is an way to exclude a single table/entity to be excluded from ddl-generation strategy drop-and-create-tables? I need to preserve the content of this table, while all other tables should be droped and been created complete new.

The reason is that the domain model is under heavy development so there are changed all and everywhere. But one single table (containing postal codes) should be preserved, because they are needed for development, and it takes to long to insert them all at every server start.

I know one way is to use two different persistence units. But this would cause some other trouble, so this not my preferred way.

Summary: Does anybody know a way to exclude a single table from droping while all other tables get droped and been recreated at each server start with ecliselink 2.3.2 (and Glassfish 3.1.2 )?

No comments:

Post a Comment