diff --git a/plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/DqpPlugin.java b/plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/DqpPlugin.java
index 7052ca1..edaee8e 100644
--- a/plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/DqpPlugin.java
+++ b/plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/DqpPlugin.java
@@ -9,6 +9,8 @@
 
 import java.io.IOException;
 import java.util.ResourceBundle;
+
+import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
@@ -24,7 +26,14 @@
 import org.teiid.core.designer.event.IChangeNotifier;
 import org.teiid.core.designer.util.PluginUtilImpl;
 import org.teiid.datatools.connectivity.ConnectivityUtil;
+import org.teiid.designer.core.workspace.ModelWorkspaceManager;
+import org.teiid.designer.core.workspace.ModelWorkspaceNotification;
+import org.teiid.designer.core.workspace.ModelWorkspaceNotificationAdapter;
+import org.teiid.designer.extension.ExtensionPlugin;
+import org.teiid.designer.extension.registry.ModelExtensionRegistry;
 import org.teiid.designer.runtime.connection.spi.IPasswordProvider;
+import org.teiid.designer.runtime.extension.rest.RestModelExtensionAssistant;
+import org.teiid.designer.runtime.extension.rest.RestModelExtensionConstants;
 
 
 /**
@@ -60,6 +69,9 @@
      */
     public static PluginUtil Util = new PluginUtilImpl(PLUGIN_ID, I18N_NAME, ResourceBundle.getBundle(I18N_NAME));
 
+
+    private ModelWorkspaceNotificationAdapter workspaceListener = null;
+    
     /**
      * The shared instance.
      */
@@ -250,6 +262,31 @@
 
         // initialize preferences
         initializeDefaultPreferences();
+        
+        // register to receive workspace model events
+        this.workspaceListener = new ModelWorkspaceNotificationAdapter() {
+
+            /**
+             * {@inheritDoc}
+             *
+             * @see org.teiid.designer.core.workspace.ModelWorkspaceNotificationAdapter#notifyReloaded(org.teiid.designer.core.workspace.ModelWorkspaceNotification)
+             */
+            @Override
+            public void notifyReloaded(ModelWorkspaceNotification notification) {
+                handleNewModelEvent(notification);
+            }
+
+            /**
+             * {@inheritDoc}
+             *
+             * @see org.teiid.designer.core.workspace.ModelWorkspaceNotificationAdapter#notifyAdd(org.teiid.designer.core.workspace.ModelWorkspaceNotification)
+             */
+            @Override
+            public void notifyAdd(ModelWorkspaceNotification notification) {
+                handleNewModelEvent(notification);
+            }
+        };
+        ModelWorkspaceManager.getModelWorkspaceManager().addNotificationListener(this.workspaceListener);
     }
 
     /**
@@ -270,5 +307,26 @@
             super.stop(context);
         }
     }
+    
+    /**
+     * @param notification the notification being handled (never <code>null</code>)
+     */
+    void handleNewModelEvent(final ModelWorkspaceNotification notification) {
+        if (notification.isPostChange()) {
+            final IResource model = (IResource)notification.getNotifier();
+
+            if (model != null) {
+                final ModelExtensionRegistry registry = ExtensionPlugin.getInstance().getRegistry();
+                final String prefix = RestModelExtensionConstants.NAMESPACE_PROVIDER.getNamespacePrefix();
+                final RestModelExtensionAssistant assistant = (RestModelExtensionAssistant)registry.getModelExtensionAssistant(prefix);
+
+                try {
+                    assistant.applyMedIfNecessary(model);
+                } catch (Exception e) {
+                    Util.log(e);
+                }
+            }
+        }
+    }
 
 }
diff --git a/plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/extension/rest/RestModelExtensionAssistant.java b/plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/extension/rest/RestModelExtensionAssistant.java
index 8a1dcc4..4530d9a 100644
--- a/plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/extension/rest/RestModelExtensionAssistant.java
+++ b/plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/extension/rest/RestModelExtensionAssistant.java
@@ -7,13 +7,18 @@
  */
 package org.teiid.designer.runtime.extension.rest;
 
+import org.eclipse.core.resources.IResource;
 import org.eclipse.emf.ecore.EObject;
 import org.teiid.core.designer.util.CoreArgCheck;
+import org.teiid.designer.core.ModelerCore;
 import org.teiid.designer.core.extension.EmfModelObjectExtensionAssistant;
+import org.teiid.designer.core.workspace.ModelResource;
 import org.teiid.designer.core.workspace.ModelUtil;
 import org.teiid.designer.extension.ExtensionConstants;
 import org.teiid.designer.extension.properties.ModelExtensionPropertyDefinition;
+import org.teiid.designer.metamodels.core.ModelType;
 import org.teiid.designer.metamodels.relational.Procedure;
+import org.teiid.designer.metamodels.relational.RelationalPackage;
 import org.teiid.designer.runtime.extension.rest.RestModelExtensionConstants.PropertyIds;
 
 /**
@@ -24,6 +29,24 @@
 public class RestModelExtensionAssistant extends EmfModelObjectExtensionAssistant {
 
     /**
+     * Saves the relational MED to a model if necessary.
+     * @param model the model being checked (can be <code>null</code>)
+     * @throws Exception if there is an error applying MED
+     */
+    public void applyMedIfNecessary(final IResource model) throws Exception {
+        if (model != null) {
+            final ModelResource modelResource = ModelerCore.getModelWorkspace().findModelResource(model);
+
+            if (modelResource != null && !modelResource.isReadOnly()) {
+                if ((ModelType.VIRTUAL_LITERAL == modelResource.getModelType())
+                    && RelationalPackage.eNS_URI.equals(modelResource.getPrimaryMetamodelUri()) && !supportsMyNamespace(model)) {
+                    saveModelExtensionDefinition(model);
+                }
+            }
+        }
+    }
+	
+    /**
      * {@inheritDoc}
      *
      * @see org.teiid.designer.core.extension.EmfModelObjectExtensionAssistant#getPropertyDefinition(java.lang.Object, java.lang.String)