split out the code that updates an entity from writeItem function
split out the code that updates an entity from writeItem function

potherca/data-import,ptorti/data-import,mikifus/data-import,smilesrg/data-import,intrepion/data-import,portphp/portphp,jeroendesloovere/data-import-php,seydu/data-import,Muoversi/data-import,ddeboer/data-import,gnat42/data-import,igormukhingmailcom/data-import,Edouard-chin/data-import,MjAbuz/data-import,potherca-contrib/data-import