« Return to Thread: GRAILS-1320

Re: GRAILS-1320

by Jesse O'Neill-Oine-2 :: Rate this Message:

Reply to Author | View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.
Yes, they do.  However, in trying to create a simple test case to show the problem, I'm seeing things work as expected.  I'm going to dig into it a little more and see if I can come up with a test case that shows the issue.

-Jesse

On 10/9/07, Jeff Brown <brownj@...> wrote:
Jesse,

Do your Bar objects (or Document objects per the JIRA) implement Comparable?



jb


On 10/9/07, Jesse O'Neill-Oine <jesse@...> wrote:
GRAILS-1320 is driving me crazy lately.  I use SortedSet quite a bit in my app and I hate having to do the workaround for every one I use.  Right now the bug isn't on the list for 1.0; is there any chance this can be fixed for 1.0?  I'm kinda surprised that more people aren't complaining about this problem, which leads me to ask: am I just doing this wrong (i.e. is there a better way to deal with this problem)?

Should be:
class Foo {
  SortedSet bars
  static hasMany = [bars:Bar]
}

Instead I have to do:
class Foo {
  SortedSet bars = new TreeSet()
  static hasMany = [bars:Bar]

  public void setBars(Collection c) {
    if (c instanceof SortedSet) {
      bars = c
    } else {
      bars = new TreeSet(c)
    }
  }
}

--
----------------------------------------------------------
Jesse O'Neill-Oine // jesse@...
Refactr LLC // http://refactr.com
mobile // 612-670-5037
----------------------------------------------------------



--
Jeff Brown
Principal Software Engineer
Object Computing Inc.
http://www.ociweb.com/

Autism Strikes 1 in 166
Find The Cause ~ Find The Cure
http://www.autismspeaks.org/



--
----------------------------------------------------------
Jesse O'Neill-Oine // jesse@...
Refactr LLC // http://refactr.com
mobile // 612-670-5037
----------------------------------------------------------

 « Return to Thread: GRAILS-1320