We have moved to GitHub Issues
Created by Shannon Deminick 15 Jan 2016, 15:53:39 Updated by Stephan 20 Jan 2016, 14:27:20Tags: ModelsBuilder
Relates to: U4-7747
Example, create a doc type:
the markup generated is:
which is wrong, the class name is 'TEst'
The models builder gets the class name as:
ClrName = contentType.Alias.ToCleanString(CleanStringType.ConvertCase | CleanStringType.PascalCase)
BUT then it is possible to change that name via attributes. So although the alias is "foo", the class name could be "Bar". The ''only'' proper way to know the class name associated to an alias is by querying the published content model factory.
The right way to do it is to modify the IPublishedContentModelFactory interface to add the
Type GetModelType(string contentTypeAlias);
method - because only the factory knows about the type. If we don't want to change that interface ''now'' for compatibility reasons, there is an ugly way to do it that would work with the built-in factory - but probably not with any other factory. And Ditto has its own factory.
Shannon has a task that is basically a duplicate of this, talk to him
Fixed by U4-7747
Priority: Task - Pri 1
Backwards Compatible: True
Affected versions: 7.4.0
Due in version: 7.4.0
Sprint: Sprint 7