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-3823

list() returns an array of nulls

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Not A Bug
  • Affects Version/s: 1.1-beta2
  • Fix Version/s: 1.1-RC1
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows XP

Description

Calling Campaign.list() on the following domain class under 1.04 worked fine, however, in 1.1-beta2 it returns a list of nulls.

class Campaign {

Long id
String key
String name
String description

static mapping = {
table 'ca_campaign'
version false
columns

{ id column:'campaign_id' }

id generator:'sequence', params:[sequence:'ca_campaign_campaign_id_seq']
}

}

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Git Commits
Hide
Permalink
Peter Ledbrook added a comment - 04/Feb/09 2:20 AM

Note that your mapping is incorrect. You should not have multiple "id" entries. The mapping should be:

static mapping = {
    table 'ca_campaign'
    version false
    id column:'campaign_id', generator:'sequence', params:[sequence:'ca_campaign_campaign_id_seq']
}

With this change, I cannot reproduce your problem with beta3.

Show
Peter Ledbrook added a comment - 04/Feb/09 2:20 AM Note that your mapping is incorrect. You should not have multiple "id" entries. The mapping should be: static mapping = { table 'ca_campaign' version false id column:'campaign_id', generator:'sequence', params:[sequence:'ca_campaign_campaign_id_seq'] } With this change, I cannot reproduce your problem with beta3.
Hide
Permalink
Andrew Zielinski added a comment - 06/Feb/09 9:34 PM

Thanks.

Should an appropriate exception be thrown if that is the case?

Show
Andrew Zielinski added a comment - 06/Feb/09 9:34 PM Thanks. Should an appropriate exception be thrown if that is the case?

People

  • Assignee:
    Graeme Rocher
    Reporter:
    Andrew Zielinski
Vote (0)
Watch (1)

Dates

  • Created:
    13/Jan/09 7:16 PM
    Updated:
    10/Feb/09 9:07 AM
    Resolved:
    10/Feb/09 9:07 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.