1
Vote

Mapping bug => Persistent attributes don't get generated anymore

description

In LoadSSDL method we find this:
                                        //modified - churst 1/3/2011 Add code to strip out the Namespace from the Mappings list
                                        if (sModelNamespace != string.Empty)
                                        {
                                            name = name.Replace(string.Format("{0}.", sModelNamespace), string.Empty);
                                        }
But then in ProcessGeneratedClass we find this:
        //modified - churst 1/3/2011 Corrected hardcoded Namespace issue from BusinessModel over to the value in the Namespace property
        if (sModelNamespace != string.Empty)
        {
            if (m_mappings.ContainsKey(string.Format("{0}.{1}", sModelNamespace, entity.Attribute("Name").Value)))
            {
                mapping = m_mappings[string.Format("{0}.{1}", sModelNamespace, entity.Attribute("Name").Value)];
            }
        }
 
Which means the mapping never won't get a value because no entry will be found in m_mappings dictonary (above the namespace is removed and here it's checked with namespace). This has the result that Persistent attributes are not generated (and maybe other affects).

comments