Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/featuretable/table/DynFieldFacadeOfAFeatureAttributeDescriptor.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/featuretable/table/DynFieldFacadeOfAFeatureAttributeDescriptor.java	(revision 44500)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/featuretable/table/DynFieldFacadeOfAFeatureAttributeDescriptor.java	(revision 44501)
@@ -604,4 +604,9 @@
         return null;
     }
 
+    @Override
+    public boolean hasOnlyMetadataChanges(FeatureAttributeDescriptor other) {
+        return false;
+    }
+
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/test/java/org/gvsig/fmap/dal/feature/DummyFeatureType.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/test/java/org/gvsig/fmap/dal/feature/DummyFeatureType.java	(revision 44500)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/test/java/org/gvsig/fmap/dal/feature/DummyFeatureType.java	(revision 44501)
@@ -471,4 +471,9 @@
         return null;
     }
 
+    @Override
+    public boolean hasOnlyMetadataChanges(FeatureType other) {
+        return false;
+    }
+
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/test/java/org/gvsig/fmap/dal/feature/DummyFeatureAttributeDescriptor.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/test/java/org/gvsig/fmap/dal/feature/DummyFeatureAttributeDescriptor.java	(revision 44500)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/test/java/org/gvsig/fmap/dal/feature/DummyFeatureAttributeDescriptor.java	(revision 44501)
@@ -573,5 +573,10 @@
     public DataProfile getDataProfile() {
         return null;
     }
+
+    @Override
+    public boolean hasOnlyMetadataChanges(FeatureAttributeDescriptor other) {
+        return false;
+    }
    
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/feature/FeatureType.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/feature/FeatureType.java	(revision 44500)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/feature/FeatureType.java	(revision 44501)
@@ -332,12 +332,16 @@
     FeatureStore getAsFeatureStore();
     
     public String getNewFieldName();
-     /**
-     * Return the store associated to this type.
-     * It will return Null when it's in not editing mode
+
+    /**
+     * Return the original feature type of this type.
+     * It will return Null when the store it's in not editing mode
      * or the featureType has not been change
      * 
-     * @return the original FeatureStore of the type.
+     * @return the original FeatureType of the type.
      */
     public FeatureType getOriginalFeatureType();
+    
+    public boolean hasOnlyMetadataChanges(FeatureType other);
+
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/feature/FeatureAttributeDescriptor.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/feature/FeatureAttributeDescriptor.java	(revision 44500)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/feature/FeatureAttributeDescriptor.java	(revision 44501)
@@ -270,4 +270,7 @@
         public String getLocalizedLabel();
 
         public String getLabelOfValue(Object value);
+        
+        public boolean hasOnlyMetadataChanges(FeatureAttributeDescriptor other);
+        
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureStore.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureStore.java	(revision 44500)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureStore.java	(revision 44501)
@@ -196,7 +196,7 @@
     private SpatialManager spatialManager;
 
     private FeatureType defaultFeatureType = null;
-    private List featureTypes = new ArrayList();
+    private List<FeatureType> featureTypes = new ArrayList<>();
 
     private int mode = MODE_QUERY;
     private long versionOfUpdate = 0;
@@ -1234,6 +1234,21 @@
             if (type == null) {
                 throw new NullFeatureTypeException(getName());
             }
+            if (mode == MODE_QUERY && type.hasOnlyMetadataChanges(this.featureTypeManager.getOriginalFeatureType())) {
+                FeatureType theType = type.getCopy();
+                if( defaultFeatureType.getId().equals(theType.getId()) ) {
+                    defaultFeatureType = theType;
+                }
+                for (int i = 0; i < featureTypes.size(); i++) {
+                    FeatureType featureType = featureTypes.get(i);
+                    if( featureType.getId().equals(theType.getId()) ) {
+                        featureTypes.set(i, theType);
+                        break;
+                    }
+                }
+                saveDALFile();
+                return ;
+            }
             boolean typehasStrongChanges = ((DefaultEditableFeatureType) type).hasStrongChanges();
             if (typehasStrongChanges) {
                 checkInEditingMode();
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureAttributeDescriptor.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureAttributeDescriptor.java	(revision 44500)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureAttributeDescriptor.java	(revision 44501)
@@ -1155,10 +1155,12 @@
         return this.indexed;
     }
     
+    @Override
     public boolean isForeingKey() {
         return this.foreingKey!=null && this.foreingKey.isForeingKey();
     }
     
+    @Override
     public ForeingKey getForeingKey() {
         return this.foreingKey;
     }
@@ -1383,4 +1385,40 @@
         DefaultFeatureType.RECENTS_USEDS.add(this);
     }
 
+    @Override
+    public boolean hasOnlyMetadataChanges(FeatureAttributeDescriptor other) {
+        if( other == null ) {
+            throw new NullPointerException();
+        }
+        DefaultFeatureAttributeDescriptor old = (DefaultFeatureAttributeDescriptor) other;
+        if( !StringUtils.equalsIgnoreCase(old.name, this.name) ) {
+            return false;
+        }
+        if( old.isComputed() && old.isComputed()==this.isComputed() ) {
+            return true;
+        }
+        if( this.dataType!=old.dataType ) {
+            return false;
+        }
+        if( this.size != old.size ) {
+            return false;
+        }
+        if( this.precision != old.precision ) {
+            return false;
+        }
+        if( this.primaryKey != old.primaryKey ) {
+            return false;
+        }
+        if( this.geomType != old.geomType ) {
+            return false;
+        }
+        if( this.SRS != old.SRS ) {
+            return false;
+        }
+        if( this.isAutomatic != old.isAutomatic ) {
+            return false;
+        }
+        return true;
+    }
+    
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureType.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureType.java	(revision 44500)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureType.java	(revision 44501)
@@ -1123,4 +1123,33 @@
         }
         return store.getOriginalFeatureType(this);
     }
+    @Override
+    public boolean hasOnlyMetadataChanges(FeatureType old) {
+        if( old == null ) {
+            throw new NullPointerException();
+        }
+        // Si hay campos nuevos -> false
+        for (FeatureAttributeDescriptor attr : this) {
+            if( old.getAttributeDescriptor(attr.getName())==null ) {
+                return false;
+            }
+        }
+        
+        // Si se ha eliminado algun campo -> false
+        for (FeatureAttributeDescriptor attr : old) {
+            if( this.getAttributeDescriptor(old.getName())==null ) {
+                return false;
+            }
+        }
+        
+        // No hay campos nuevos ni se ha eliminado ninguno, asi que comparamos
+        // los campos uno a uno.
+        for (FeatureAttributeDescriptor attr : this) {
+            FeatureAttributeDescriptor attrold = old.getAttributeDescriptor(attr.getName());
+            if( !attr.hasOnlyMetadataChanges(attrold) ) {
+                return false;
+            }
+        }
+        return true;
+    }
 }
