|Supporting table structure changes in JPA/Eclipselink [message #1793198]
||Wed, 01 August 2018 12:53
| Javed Shaikh
Registered: August 2018
I'm fairly new to JPA/Eclipselink and facing a problem which is in 2 parts - First - I needed to add CLOB field my existing table. I made the required change to persistence classes and it worked with MySQL as database without changing the below property:|
<property name="eclipselink.ddl-generation" value="create-tables"/>
However on a DB2 database it does not work that way and had to change it to :
<property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
I realized that this is not going to work on the production environment running DB2 and I'm not sure whether there is any support within JPA/Eclipselink to support creation of the column without deleting the rest of the data.
Second - A CLOB or LOB field is not treated the same way on a DB2 as it is on MySQL. Althought it generated the requisite SQL script for the DB2 database when I deployed my application it looks like it wasn't enough (DB2 requires more than just a field declaration for a CLOB column - it seems ROWID, tablespace and a few more things are needed). Does JPA support this? If there isn't can I provide additional actions through JPA post deployment for running a script?
Any help with the above would be awesome.
Powered by FUDForum
. Page generated in 0.01379 seconds