Remove database data with GRAILS AND GORM

Asked

Viewed 85 times

0

I’m learning a little bit about GRAILS and I’m having the following problem I can display the information of some registered users usually more when I try to delete them I can’t and I get no error, follow the code

def delete() {
    Usuario user = Usuario.get(params.id)
    user.delete()
    redirect action:"index"
}

if I print on the screen this variable user i have access to all user information however while trying to remove it nothing happens

I’m sending the id thus delete/id

//EDIT I’m having the same problem while updating the data..

1 answer

1

I figured I needed to send a flush:true next to the hibernate does not update data instantly

Browser other questions tagged

You are not signed in. Login or sign up in order to post.