In EF5 CodeFirst when EF is creating mapping between model and store properties it requests the store type usage corresponding to the model type usage (DbProviderManifest.GetStoreType()) but stores only the name of the type and not the facets (StructuralTypeMappingGenerator.MapTableColumn and StructuralTypeMappingGenerator.MapPrimitivePropertyFacets). When we later we write the SSDL we don't have facets originally returned by the provider and we don't write them. This may cause problems for some providers (most notably Oracle) who are using the same store type to represent multiple Edm types and use facets (e.g. scale and precision) to distinguish among them.
In the enclosed repro (note it uses slightly modified SampleEFOracleProvider and requires Oracle Express and ODP.NET) set a breakpoint on line 413 in EFOracleProviderManifest.GetStoreType() where for the Edm.Int32 type a decimal store type with precision 11 and scale 0 is returned but in the SSDL these values are missing and therefore when the SSDL is loaded the property is of "number" type which - when passed to the EFOracleProviderManifest.GetEdmType(TypeUsage storeType) - is converted to a decimal type (line 325 commented).
In the enclosed repro (note it uses slightly modified SampleEFOracleProvider and requires Oracle Express and ODP.NET) set a breakpoint on line 413 in EFOracleProviderManifest.GetStoreType() where for the Edm.Int32 type a decimal store type with precision 11 and scale 0 is returned but in the SSDL these values are missing and therefore when the SSDL is loaded the property is of "number" type which - when passed to the EFOracleProviderManifest.GetEdmType(TypeUsage storeType) - is converted to a decimal type (line 325 commented).