A couple users complained that my CF Groovy demo app doesn't work on MS SQL Server because Hibernate doesn't escape the table names it creates, and "user" is a reserved word. Since I do all my work on MySQL, I never saw the issue.
I've updated the code to use an @Table annotation to specify an alternate table name ("user_t") to use, to alleviate the issue. No other code changed. If you update to the new code, your existing data will "disappear". In reality, it doesn't disappear, Hibernate just created a new blank table with the new name. If you want the old data back, just do a "insert into user_t select from User;" (or whatever the equivalent is), and then drop the "User" table.
As always, the demo is available at: http://barneyb.com/cfgroovy/, including instructions on how to get the latest code.
Comments are closed.