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

Key: GRAILS-1772
Type: Bug Bug
Status: Resolved Resolved
Resolution: Won't Fix
Priority: Blocker Blocker
Assignee: Graeme Rocher
Reporter: Marc Palmer
Votes: 0
Watchers: 0
Operations

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

Command objects don't seem to ever return true from hasErrors during integration testing

Created: 02/Nov/07 07:16 AM   Updated: 28/Nov/07 06:57 AM
Component/s: None
Affects Version/s: 1.0-RC1
Fix Version/s: 1.0-RC2

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive CommandObjectHasErrorsTest.zip (236 kb)



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Marc Palmer - 02/Nov/07 09:50 AM
This isolates the issue

Marc Palmer - 02/Nov/07 09:51 AM
Hmm I don't know what is up with this - any clues? See attached test project

Graeme Rocher - 28/Nov/07 05:33 AM
Seems that constraints allow null values unless nullable:false is specified. Doing this fixes your test:
static constraints = {
        input(size:5..10, nullable:false)
    }

Sergey Nebolsin - 28/Nov/07 06:09 AM
It looks like there is an inconsistence between domain classes (where all properties are not nullable by default) and command objects, isn't it?

I think that a separate issue should be raised to apply nullable:false to command objects' properties by default. Thoughts?


Graeme Rocher - 28/Nov/07 06:57 AM
Probably sensible