Hey guys (and possible girls
I have found an interesting “issue” when using LiquiBase to create database views.
My app is running on WebSphere and using JNDI data source that has no scheme defined (as it is used by more then one application and each application specifies schema in its own configuration).
In Hibernate I can specify schema using :
- ${jdbc.schema}
- replaceIfExists is not allowed on db2
- SELECT ROWNUMBER() OVER() as ID, MAD_SERVER_ID as MAD_SERVER_ID, SUBSTR( xmlserialize
- (xmlagg
(xmltext (concat (’,’, MAD_SERVER_PROPERTY.NAME))) AS VARCHAR(255)), 2)
- as PROPERTIES FROM mad_server INNER JOIN MAD_SERVER_TO_PROPERTY ON MAD_SERVER_TO_PROPERTY.MAD_SERVER_ID
- =
mad_server.ID INNER JOIN MAD_SERVER_PROPERTY ON MAD_SERVER_TO_PROPERTY.PROPERTY_ID
- = MAD_SERVER_PROPERTY.ID GROUP BY MAD_SERVER_ID
I could put SCHEMA.mad_server into the SQL but that would loose the portability.
Any idea how this could be done? Or is it database (or DB2) related “issue”/feature.
All this happens on DB2 9.7.
Thanks !
PS : If I use local data source with schema specified it work fine !