Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Duplicate
-
Affects Version/s: 1.1.2
-
Fix Version/s: None
-
Component/s: Project infrastructure
-
Labels:None
-
Environment:Ubuntu Linux 9.10 (32 bit), JDK 1.6.0_16
-
Testcase included:yes
Description
Grails 1.1.2 breaks update action on a domain class with a relationship to another domain class which has a constraints block.
Consider the very simple classes below:
class Author {
String name
static constraints = {}
}
class Book {
Author author
}
class BookController {
def scaffold = true
}
class Bootstrap {
def init = { servletContext ->
new Author(name:'Fred').save()
new Author(name:'James').save()
}
The error is:
Error 500: java.lang.ClassCastException: Author$_clinit_closure1 cannot be cast to java.util.Map
Test case:
Create a new book with author 'Fred'.
On the 'Show Book'page, press the 'Edit' button
On the 'Edit Book' page, press the 'Update' button (don't change the author)
As mentioned, when a different author is chosen, the update works fine. When the Author class has no constraints, the update works fine too.
I have not seen this problem in 1.1.1.
Issue Links
- duplicates
-
GRAILS-5445
Problem when binding multiple related domain objects
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits