Grails JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile
Grails
  • Grails
  • GRAILS-3396 Top level task: GORM Improvements
  • GRAILS-3561

Can't Have a Many-to-Many with a List

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.1-beta3
  • Component/s: Persistence
  • Labels:
    None
  • Testcase included:
    yes

Description

If you have a many-to-many relationship, you cannot use a List collection type or you get the following error:

could not insert: [Bar]; nested exception is org.hibernate.exception.SQLGrammarException: could not insert: [Bar]
org.springframework.dao.InvalidDataAccessResourceUsageException: could not insert: [Bar]; nested exception is org.hibernate.exception.SQLGrammarException: could not insert: [Bar]
at FooTests.testManyToManyBars(FooTests.groovy:51)
Caused by: org.hibernate.exception.SQLGrammarException: could not insert: [Bar]
at $Proxy5.saveOrUpdate(Unknown Source)
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'bars_id' in 'field list'

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. File
    Bar.groovy
    11/Nov/08 2:47 PM
    0.1 kB
    Robert Fischer
  2. File
    Foo.groovy
    11/Nov/08 2:47 PM
    0.1 kB
    Robert Fischer
  3. File
    FooTests.groovy
    11/Nov/08 2:47 PM
    2 kB
    Robert Fischer

Issue Links

is related to

Sub-task - The sub-task of the issue GRAILS-3862 Can't have a Many-to-Many with a Map

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Git Commits
Hide
Permalink
Graeme Rocher added a comment - 18/May/11 8:41 AM

Bulk closing bunch of resolved issues

Show
Graeme Rocher added a comment - 18/May/11 8:41 AM Bulk closing bunch of resolved issues

People

  • Assignee:
    Graeme Rocher
    Reporter:
    Robert Fischer
Vote (0)
Watch (0)

Dates

  • Created:
    11/Nov/08 2:47 PM
    Updated:
    18/May/11 8:41 AM
    Resolved:
    22/Jan/09 4:41 AM

Agile

  • View on Board
  • Atlassian JIRA (v5.2.1#813-sha1:277a546)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Grails project. Try JIRA - bug tracking software for your team.