Revision 44190 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.db/org.gvsig.fmap.dal.db.jdbc/src/main/java/org/gvsig/fmap/dal/store/jdbc2/spi/operations/PerformChangesOperation.java
PerformChangesOperation.java | ||
---|---|---|
286 | 286 |
attrOrgiginal.getName() |
287 | 287 |
); |
288 | 288 |
if (attrTarget == null) { |
289 |
if( attrOrgiginal.isComputed() ) { |
|
290 |
continue; |
|
291 |
} |
|
289 | 292 |
sqlbuilder.alter_table().drop_column(attrOrgiginal.getName()); |
290 | 293 |
} else if( !this.areEquals(attrOrgiginal, attrTarget) ) { |
294 |
if( attrTarget.isComputed() ) { |
|
295 |
continue; |
|
296 |
} |
|
291 | 297 |
if( attrTarget.getType()==DataTypes.GEOMETRY ) { |
292 | 298 |
sqlbuilder.alter_table().alter_geometry_column( |
293 | 299 |
attrTarget.getName(), |
... | ... | |
313 | 319 |
} |
314 | 320 |
} |
315 | 321 |
for (FeatureAttributeDescriptor attrTarget : target) { |
322 |
if( attrTarget.isComputed() ) { |
|
323 |
continue; |
|
324 |
} |
|
316 | 325 |
if (original.getAttributeDescriptor(attrTarget.getName()) == null) { |
317 | 326 |
if( attrTarget.getType()==DataTypes.GEOMETRY ) { |
318 | 327 |
sqlbuilder.alter_table().add_geometry_column( |
... | ... | |
433 | 442 |
try { |
434 | 443 |
st = conn.createStatement(); |
435 | 444 |
for (String sql : sqls) { |
436 |
JDBCUtils.execute(st, sql); |
|
445 |
if( !StringUtils.isBlank(sql) ) { |
|
446 |
JDBCUtils.execute(st, sql); |
|
447 |
} |
|
437 | 448 |
} |
438 | 449 |
} catch (SQLException e) { |
439 | 450 |
throw new JDBCSQLException(e); |
Also available in: Unified diff