There is a new feature in EF Designer in VS2012 where we update facets of C-Space properties based on facets on S-Space properties. This is done to propagate changes the user made to the database to the C-Space (in VS 2010 only SSDL would be updated leading to discrepancies between C-Space model and S-Space model). However in some cases (e.g. Oracle) the discrepancy is intentional and brings additional information needed to map types correctly. Overriding facets blindly (i.e. without asking the provider first) in such cases is incorrect. Propagating facets can be disabled by setting Update Property Facets property to false. However this will work only when updating the model from the database and not when when generating the model from the database since there is no edmx file in such a case and, even if there was, EF Designer ignores it. Running facet synchronization when creating the model from the database is not needed since there is no custom code between generating the model from the database and propagating the facets nothing could change.
Conclusion: We should not run the facet propagation step at all when creating the model from the database. We should make sure that we ask provider for the types the provider knows in order to prevent overriding facets that are not supposed to be overriden.
Workaround: Instead of creating the model from the database create an empty model. Set the Update Property Facets setting to false. Update the model from the database.
Conclusion: We should not run the facet propagation step at all when creating the model from the database. We should make sure that we ask provider for the types the provider knows in order to prevent overriding facets that are not supposed to be overriden.
Workaround: Instead of creating the model from the database create an empty model. Set the Update Property Facets setting to false. Update the model from the database.