How to put callbacks in a column name called sleep key

I have a MySQL DB table that I cannot change, but I need to insert values. It has a column called key that I need to insert.

Now my .hbm.xml file has:

  <property name="key" type="string" column="key" /> 

The created insert request is not executed. When adding [key], the generated SQL now contained key , but that also failed. When checking in the MYSql Workbench, I found that key can work.

However, if I change this in the file mentioned above, it returns to the "key", as when using [key]. Can someone explain to me how I can add key and call the required insert?

+4
source share
1 answer

There is a sleep configuration option for this. He needs Hibernate 3.5, and I'm not sure if you are using it based on the use of hbm files.

In hibernate configuration settings

 hibernate.globally_quoted_identifiers=true 

Environment configuration list here

+5
source

Source: https://habr.com/ru/post/1487190/


All Articles