1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / The column's table is not the same as the table being joined from

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

2 posts, 0 answered
  1. Jeff
    Jeff avatar
    118 posts
    Registered:
    08 Jul 2011
    04 Sep 2012
    Link to this post
    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.
  2. Jeff
    Jeff avatar
    118 posts
    Registered:
    08 Jul 2011
    08 Sep 2012
    Link to this post
    Anyone?
2 posts, 0 answered