I am failing an integration test because in my project there is a domain class named Order. That is a known keyword in SQL. The exception generated even hints at an SQLGrammarException. One obvious solution is to rename the class. Is there any solution that will allow me to keep the name of the class as is?
You can escape the name by specifying a mapping
class Order {
static mapping = {
table "`Order`"
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.