History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: GRAILS-1320
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Graeme Rocher
Reporter: Jakub W. Jozwicki
Votes: 3
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Grails

When member of Domain Class is of SortedSet type there is a class clast exception from hibernate.PersistentSet

Created: 25/Jun/07 05:11 PM   Updated: 20/Nov/07 05:10 AM
Component/s: None
Affects Version/s: 0.5.6
Fix Version/s: 1.0-RC2

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive zerodotsix-bug-report-10102007.zip (58 kb)

Environment: Windows 2003 Server SP2 x86, JDK 1.6.0 Update 1


 Description  « Hide
When member of Domain Class is of SortedSet type there is a class clast exception from hibernate.PersistentSet.
Example:

class Site {
String description
SortedSet documents

static hasMany = [ documents:Document ]

// to have it working wihout class cast exception I had to add this method
public void setDocuments(Collection c) { documents = new TreeSet(c) }
}



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Jesse O'Neill-Oine - 10/Oct/07 11:36 PM
Bug report with reproducible test case. Either run tests or run app to see stack. Workaround commented out in Foo.groovy

Jesse O'Neill-Oine - 11/Oct/07 09:32 AM
Note as well that this appears to only happen on many-to-many relationships where one or both sides are Sorted. See ML thread here: http://www.nabble.com/GRAILS-1320-tf4597036.html