View Full Version : JPA: create and (auto)fill a table after creation

April 7th, 2009, 03:11 AM
Hi folks,

I basically need to let JPA know that if a table doesn't exists - I not only want it to create the table but also populate it with given values.

Example: Say I have a table that will manage colors, but I already know the basic list of colors thus I want them to already be there, the rest can be added later as needed.

I've been solving this issue with straight JDBC, but I wanna start using JPA and if it's not possible I would really be disappointed..

Any link or hint would be highly appreciated.