[CONJ-193] No escape of reserved words in hibernate calls Created: 2015-09-08 Updated: 2015-10-26 Resolved: 2015-10-26 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | 1.2.0 |
| Fix Version/s: | 1.2.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Stefan | Assignee: | Diego Dupin |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | Hibernate | ||
| Environment: |
Win7 but I thing the problem is on all platforms, mariadb 10, hibernate 3 |
||
| Description |
|
I've to use tables with reserved words in mariadb. If I try to insert data into this table using the Hibernate persist function: MariaDB throws a "systax error". Reason is, that the reserved word is not escaped in the resulting hibernate request ! This is the generated request: A correct request should look like this (with escaped attribute table): I'm not 100% sure, but I think the implementation org.hibernate.dialect is responsible for database specific implementations and should escape the reserved words. I specified the dialect this way by using MYSQL, because there is no seperate MARIADB dialect. <property name="jpaVendorAdapter"> |
| Comments |
| Comment by Diego Dupin [ 2015-10-26 ] |
|
table is a reserved word in MariaDB/MySQL databases. |