Hi,
I have an entity table_a, and a related 'joined_table', defined as follows:
(defentity table_a
(entity-fields :id :pos :from :to)
(belongs-to joined_table))
I have a mysql connection, (defdb mydb (mysql {:db ...etc...
The connection is created with connection delimiters ' :delimiters [\` \`],'
Yet I get a MySQL SQL error when I include the joined table in a 'with' clause. The JOIN clause uses double-quotes as delimiter, even though the rest of the query uses the right \` delimiters, as below:
(select table_a (with joined_table) (limit 10))
Failure to execute query with SQL:
SELECT `table_a`.*, `joined_table`.* FROM `table_a` LEFT JOIN `joined_table` ON "joined_table"."id" = "table_a"."joined_table_id" LIMIT 10 :: []
MySQLSyntaxErrorException:
Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '."id" = "table_a"."joined_table_id" LIMIT 10' at line 1
SQLState: 42000
Error Code: 1064
MySQLSyntaxErrorException You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '."id" = "table_a"."joined_table_id" LIMIT 10' at line 1 sun.reflect.NativeConstructorAccessorImpl.newInstance0 (NativeConstructorAccessorImpl.java:-2)
Am I doing something wrong?
Cant figure this out, and cant see the problem reported by others.
Cheers
Mike