I'm getting the following DB error during a build.
"Column 'VirtualLookupTitle' in where clause is ambiguous"
[Emergency] Uncaught SilverStripe\ORM\Connect\DatabaseException: Couldn't run query: SELECT DISTINCT "Element"."ClassName", "Element"."LastEdited", "Element"."Created", "Element"."AvailableGlobally", CASE WHEN "Element_Localised_nl_NL"."ID" IS NOT NULL THEN "Element_Localised_nl_NL"."VirtualLookupTitle" ELSE "Element"."VirtualLookupTitle" END AS "VirtualLookupTitle", "Element"."Version", CASE WHEN "Element_Localised_nl_NL"."ID" IS NOT NULL THEN "Element_Localised_nl_NL"."Title" ELSE "Element"."Title" END AS "Title", "Element"."ShowTitle", "Element"."Sort", CASE WHEN "Element_Localised_nl_NL"."ID" IS NOT NULL THEN "Element_Localised_nl_NL"."ExtraClass" ELSE "Element"."ExtraClass" END AS "ExtraClass", CASE WHEN "Element_Localised_nl_NL"."ID" IS NOT NULL THEN "Element_Localised_nl_NL"."Style" ELSE "Element"."Style" END AS "Style", "Element"."TopPageID", "Element"."ParentID", "Element"."ID", CASE WHEN "Element"."ClassName" IS NOT NULL THEN "Element"."ClassName" ELSE 'DNADesign\\Elemental\\Models\\BaseElement' END AS "RecordClassName", 'nl_NL' AS "Locale", CASE WHEN "Element_Localised_nl_NL"."ID" IS NOT NULL THEN 'nl_NL' ELSE NULL END AS "SourceLocale" FROM "Element" LEFT JOIN "Element_Localised" AS "Element_Localised_nl_NL" ON "Element"."ID" = "Element_Localised_nl_NL"."RecordID" AND "Element_Localised_nl_NL"."Locale" = ? WHERE (VirtualLookupTitle IS NULL AND AvailableGlobally = 1) ORDER BY "Element"."Sort" ASC Column 'VirtualLookupTitle' in where clause is ambiguous
Hi,
Thanks for the upgrade!
The following fix seems to have introduced an upgrade issue (SSv5 in combination with fluent v7).
https://github.com/dnadesign/silverstripe-elemental-virtual/issues/55 https://github.com/dnadesign/silverstripe-elemental-virtual/commit/3c96a61c95612ec5ef43ae0cdaae60e250e43f49
I'm getting the following DB error during a build.
"Column 'VirtualLookupTitle' in where clause is ambiguous"
[Emergency] Uncaught SilverStripe\ORM\Connect\DatabaseException: Couldn't run query: SELECT DISTINCT "Element"."ClassName", "Element"."LastEdited", "Element"."Created", "Element"."AvailableGlobally", CASE WHEN "Element_Localised_nl_NL"."ID" IS NOT NULL THEN "Element_Localised_nl_NL"."VirtualLookupTitle" ELSE "Element"."VirtualLookupTitle" END AS "VirtualLookupTitle", "Element"."Version", CASE WHEN "Element_Localised_nl_NL"."ID" IS NOT NULL THEN "Element_Localised_nl_NL"."Title" ELSE "Element"."Title" END AS "Title", "Element"."ShowTitle", "Element"."Sort", CASE WHEN "Element_Localised_nl_NL"."ID" IS NOT NULL THEN "Element_Localised_nl_NL"."ExtraClass" ELSE "Element"."ExtraClass" END AS "ExtraClass", CASE WHEN "Element_Localised_nl_NL"."ID" IS NOT NULL THEN "Element_Localised_nl_NL"."Style" ELSE "Element"."Style" END AS "Style", "Element"."TopPageID", "Element"."ParentID", "Element"."ID", CASE WHEN "Element"."ClassName" IS NOT NULL THEN "Element"."ClassName" ELSE 'DNADesign\\Elemental\\Models\\BaseElement' END AS "RecordClassName", 'nl_NL' AS "Locale", CASE WHEN "Element_Localised_nl_NL"."ID" IS NOT NULL THEN 'nl_NL' ELSE NULL END AS "SourceLocale" FROM "Element" LEFT JOIN "Element_Localised" AS "Element_Localised_nl_NL" ON "Element"."ID" = "Element_Localised_nl_NL"."RecordID" AND "Element_Localised_nl_NL"."Locale" = ? WHERE (VirtualLookupTitle IS NULL AND AvailableGlobally = 1) ORDER BY "Element"."Sort" ASC Column 'VirtualLookupTitle' in where clause is ambiguous