Announcement Announcement Module
Collapse
No announcement yet.
Is Roo generating incorrect SQL? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is Roo generating incorrect SQL?

    Hi All,
    After many days of incrementally fixing issues due to the @OneToMany/@ManyToOne mappings I have gotten to where I am now fixing JUnit errors. Yea!

    The propblem I'm facing now is:
    testPersist(com.socialchoring.engine.model.ChoreSt epIntegrationTest): org.hibernate.exception.SQLGrammarException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order, player_chore_id, step) values (0, null, 'step_0')' at line 1; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order, player_chore_id, step) values (0, null, 'step_0')' at line 1

    Roo generated all the SQL so I have no idea where this is occuring line 1 of what file? How do I fix generated code? Since the SQL and the JUnits that are testing the SQL are both generated by roo which one needs fixing the code or the tests for exercising the code?

    Thanks for any help,

    Andrew

  • #2
    Roo isn't generating anything, well it generates a lot but not queries that is hibernates doing so this might indicate you are using the wrong dialect or have something wrong in your mapping.

    Comment

    Working...
    X