scala - how to create update slick multiple row? -


i have code !! code insert multiple row..

def insertdocsetting(data: list[modeldocumentsetting]) = documentsettingtable ++= data 

and update multiple row!!

    def updatedocsetting(data: seq[modeldocumentsetting])= {           (a <- data){              documentsettingtable.filter(_.doc_proc_list_id === a.doc_proc_list_id).update(a)         }       } 

but ,i have problem result.. how create slick update multiple row

you need map result of filter tuple before can update it. can check how in documentation. like:

def updatedocsetting(data: seq[modeldocumentsetting])= {     (a <- data){          documentsettingtable        .filter(_.doc_proc_list_id === a.doc_proc_list_id)        .map(doc => (doc.element1, doc.element2))        .update(("new element1", "new element2"))    }    } 

Comments

Popular posts from this blog

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -