Closed nilshoerrmann closed 12 years ago
@brendo: My SQL skills are rather limited – is this error most likely caused by this or by my own Date and Time extension?
Having a look at it now, it's something to do with the sorting detection.
Hmm, I can't get the same thing to happen:
SELECT SQL_CACHE `e`.id as id, `e`.section_id, e.`author_id`, UNIX_TIMESTAMP(e.`creation_date`) AS `creation_date`, `ed`.`start` FROM `default_entries` AS `e` LEFT OUTER JOIN `default_entries_data_72` AS `ed` ON (`e`.`id` = `ed`.`entry_id`) WHERE `e`.`section_id` = 3 UNION ALL SELECT `e`.id as id, `e`.section_id, e.`author_id`, UNIX_TIMESTAMP(e.`creation_date`) AS `creation_date`, `ed`.`start` FROM `default_entries` AS `e` LEFT JOIN `default_entries_data_5` AS t5_1 ON (e.id = t5_1.entry_id) LEFT OUTER JOIN `default_entries_data_71` AS `ed` ON (`e`.`id` = `ed`.`entry_id`) WHERE `e`.`section_id` = 1 AND (t5_1.value IN ('yes')) ORDER BY `start` desc
EDIT, Ah adding a filter triggers it :)
Right, so Union Datasource relies on a bit of a convention where most fields don't change the ed
table alias. DateTime uses t31
instead (where 31
is a field ID) when filtering. That's fine, it's UD's problem :)
DateTime uses t31 instead (where 31 is a field ID) when filtering.
Interesting – I wasn't aware that Date and Time does anything special here. Thanks for the fix, will try it out now :)
Works perfectly – thanks!
When using Union Data Source on Symphony 2.3 (
integration
branch of this repository), I get the following error on the front-end:The Data Source is based on two other Data Sources that are sorted by a Date and Time field – both work just fine when not they are not united.