The column's table is not the same as the table being joined from
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));
it continues executing the code.Anyone?