I have a many to many relationship between typeCause and Client
My problem is when i unselect an item from my mutliselect component and submit it, the unselected item is not dropped in the DB
here the url that i hit http://localhost:8080/flp/typeCause/list?search.client.id=9
the url trigger the execution of this namedQuery:
search { params ->
if (params.client.id) {
clients {
'in' 'id', params.list('client.id')*.toLong()
}
}
}
and here a the view :
<div class='fieldcontain typeCauses'>
<label for='typeCause.label'>
<g:message code='typeCause.label' />
</label>
<g:select from='${TypeCause.list()}' multiple='true' name='typeCauses' optionKey='id' value='${clientInstance?.typeCauses*.id}'></g:select>
</div>
Note that my controller is scaffolded
Thank u in advance for the help