Revision 44348 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 | ||
---|---|---|
166 | 166 |
.schema(this.table.getSchema()) |
167 | 167 |
.name(this.table.getTable()); |
168 | 168 |
for (FeatureAttributeDescriptor attr : type) { |
169 |
if( attr.isAutomatic() ) { |
|
169 |
if( attr.isAutomatic() || attr.isComputed() ) {
|
|
170 | 170 |
continue; |
171 | 171 |
} |
172 | 172 |
if (attr.getType() == DataTypes.GEOMETRY) { |
... | ... | |
242 | 242 |
expbuilder.parameter(attr.getName()).as_variable() |
243 | 243 |
) |
244 | 244 |
); |
245 |
} if ( ! attr.isAutomatic() && !attr.isReadOnly() ) { |
|
246 |
if (attr.getType() == DataTypes.GEOMETRY) { |
|
247 |
sqlbuilder.update().column().name(attr.getName()).with_value( |
|
248 |
expbuilder.parameter(attr.getName()).as_geometry_variable().srs( |
|
249 |
expbuilder.parameter().value(attr.getSRS()).as_constant() |
|
250 |
) |
|
251 |
); |
|
252 |
} else { |
|
253 |
sqlbuilder.update().column().name(attr.getName()).with_value( |
|
254 |
expbuilder.parameter(attr.getName()).as_variable() |
|
255 |
); |
|
256 |
} |
|
245 |
} |
|
246 |
if ( attr.isAutomatic() || attr.isReadOnly() || attr.isComputed() ) { |
|
247 |
continue; |
|
257 | 248 |
} |
249 |
if (attr.getType() == DataTypes.GEOMETRY) { |
|
250 |
sqlbuilder.update().column().name(attr.getName()).with_value( |
|
251 |
expbuilder.parameter(attr.getName()).as_geometry_variable().srs( |
|
252 |
expbuilder.parameter().value(attr.getSRS()).as_constant() |
|
253 |
) |
|
254 |
); |
|
255 |
} else { |
|
256 |
sqlbuilder.update().column().name(attr.getName()).with_value( |
|
257 |
expbuilder.parameter(attr.getName()).as_variable() |
|
258 |
); |
|
259 |
} |
|
258 | 260 |
} |
259 | 261 |
if (!sqlbuilder.update().has_where() ) { |
260 | 262 |
throw new RuntimeException("Operation requires missing pk"); |
Also available in: Unified diff