[eluser]yoast[/eluser]
I've found a small bug in the code. One of my tables is called "group". When joining this table, this results in a MySQL-error, as it results in the following SQL:
LEFT OUTER JOIN `group` group ON `group`.`id` = `group_vehicle`.`group_id`
The table group is given the alias "group" without the quotes.
I fixed it by changing line 4579 of /application/library/datamapper.php
from:
Code:
$db->join($relationship_table . ' ' . $relationship_as, $this_table . '.id = ' . $relationship_as . '.' . $this_column, 'LEFT OUTER');
to:
Code:
$db->join($relationship_table . ' `' . $relationship_as.'`', $this_table . '.id = ' . $relationship_as . '.' . $this_column, 'LEFT OUTER');
and line 4618 from:
Code:
$db->join($object->table . ' ' . $object_as, $object_as . '.id = ' . $relationship_as . '.' . $other_column, 'LEFT OUTER');
to:
Code:
$db->join($object->table . ' `' . $object_as.'`', $object_as . '.id = ' . $relationship_as . '.' . $other_column, 'LEFT OUTER');
Maybe this is not the best way to fix this, but for me it works (and I do not have much time :-)