This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Other Languages and the fly likes Migrations/MySQL problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Languages » Other Languages
Reply Bookmark "Migrations/MySQL problem" Watch "Migrations/MySQL problem" New topic
Author

Migrations/MySQL problem

Eric Martinez
Greenhorn

Joined: Nov 20, 2005
Posts: 25
Hi again guys,

I have a migrations file that creates a table called order. The problem is that order is a reserved word in MySQL and it gave me a big headache trying to find that out. I read that in MySQL you are allowed to use reserved words as
identifiers as long as you put them in single quotes. I end up doing this



and when I try to scaffold using the order model I still get an error. Is there anyway to get around this without renaming the model?

BTW- The error I get tells me that I need to create a table for my model before updating scaffolding from new DB schema

Thanks!
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Migrations/MySQL problem
 
Similar Threads
Problem with many-to-many relationships with MySQL
About the name of table in mysql
Syntax check (losing hair now)...
EclipseLink (JPA 2.0) generates an erronous query for MySQL
Do models in Rails bother you?