I have some code that retrieves a collection of items from a module built using the module builder. This code was working in 5.0 but since upgrading to 5.1 it has stopped working and gives the following error "The column's table is not the same as the table being joined from".
Here's is the code:
var dynamicModuleManager = DynamicModuleManager.GetManager();
var whatWeLicense = TypeResolutionService.ResolveType("Telerik.Sitefinity.DynamicTypes.Model.WhatWeLicense.WhatWeLicense");
var whatWeLicenseTypeCollection = dynamicModuleManager.GetDataItems(whatWeLicense)
.Where("Published == true")
.Where("ContentType.Equals(\"" + licenseType + "\")")
.Where(s => (s.Status == ContentLifecycleStatus.Live));
If I comment out .Where("ContentType.Equals(\"" + licenseType + "\")")
it continues executing the code.
Does anyone know why this is happening? I looked at the module itself and the code reference and nothing has changed.