Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Validatable
- class FooCommand extends BarCommand{
- @BindUsing({obj, source -> return source['foo'].collect{it['id']}})
- List<Long> foo
- static constraints = {foo(nullable:true)}
- }
- JSONData = {"foo":[
- {'id':5},
- {'id':4}
- ]
- }
- FooCommand fooCommand = FooCommand(JSONData)
- fooCommand.validate()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement