Results 1 to 2 of 2

Thread: Is Roo generating incorrect SQL?

  1. #1

    Question 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. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    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.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •