-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
With a simple domain class:
class Contact {
String name
String phone
static constraints = {
name blank:false, maxSize: 255
email blank:false, maxSize: 255, unique: true
}
}And a controller save method:
def save() {
Contact contact = new Contact(name: params.name, phone: params.phone, email: params.email)
if(contact.save(flush:true)) {
def pars = [success: false, contatos: contact]
render pars as GSON
} else {
println contact.errors
def pars = [success: false, contatos: contact]
render pars as GSON
}
}I'm getting StackOverflowError if I try to serialize a non-saved instance. This can be simulated in an Integration Test:
void testNewElement() {
contactController.params.name = "teste"
contactController.save()
}Metadata
Metadata
Assignees
Labels
No labels