80 if($location = $address->getLocation())
83 $res = $location->save();
85 if(!$res->isSuccess())
87 $result->addErrors($res->getErrors());
91 $fields = Entity\Address\Converter\DbFieldConverter::convertToDbField($address);
93 if((
int)$fields[
'ID'] > 0)
95 $result = $this->tableClass::update($fields[
'ID'], $fields);
99 $result = $this->tableClass::add($fields);
101 if($result->isSuccess())
103 $address->setId($result->getId());
107 if($address->getId() <= 0 || !$result->isSuccess())
114 if(!$res->isSuccess())
116 $result->addErrors($res->getErrors());
121 if(!$res->isSuccess())
123 $result->addErrors($res->getErrors());