The column's table is not the same as the table being jo

Posted by Community Admin on 04-Aug-2018 23:11

The column's table is not the same as the table being joined from

All Replies

Posted by Community Admin on 04-Sep-2012 00:00

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.

Posted by Community Admin on 08-Sep-2012 00:00

Anyone?

This thread is closed