Search code examples
sitecoreglass-mappersitecore7.2

Sitecore Glass create not creating correct template type


I am seeing a weird issue with the latest version of Sitecore glass and Sitecore 7.2 latest rev. I have a Foo class that has a base class of BaseItem, both wired up to Sitecore templates using glass attributes. When I use glass to insert a new item into sitecore it's using the BaseItem template instead of Foo UNLESS there is one item already in the folder I am inserting the item into. Has anyone experienced this issue?

I added some code to help. https://gist.github.com/anonymous/a8ac94a682f415b6fbcd


Solution

  • This was a bug in Glass.Mapper. I have made a fix which is being built at the moment. When ready download Glass.Mapper 3.0.12.24 and Glass.Mapper.Sc 3.2.1.40.