I'm having a legacy Database including a dash in its name:
which includes tables I want to work with.
The EntityMapping would be the following:
Both concludes in a Query (SELECT, INSERT etc.) which won't work:
SQLSTATE: Syntax error or access violation: 1064 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 '-db.stuff t0 WHERE[...]
I found a simple fix by trial and Error. Just put a "`" in front of the databasename:
Although this fix works, it feels wrong.
Moreover, to prevent confusing other developers, this should be fixed to one the following styles.