| @@ 428-444 (lines=17) @@ | ||
| 425 | $properties = $reflection->getProperties(); |
|
| 426 | ||
| 427 | try { |
|
| 428 | foreach ($properties as $propObj) { |
|
| 429 | $propName = $propObj->name; |
|
| 430 | ||
| 431 | if (isset($row[$propName])) { |
|
| 432 | // filter transient attributes |
|
| 433 | if (!in_array($propName, $this->BO->getTransientAttributes())) { |
|
| 434 | $this->BO->set($propName, $row[$propName]); |
|
| 435 | } elseif (!$propObj->isPrivate() && $this->BO->get($propName) != '' && $this->BO->getPropObject($propName) instanceof Relation) { |
|
| 436 | $prop = $this->BO->getPropObject($propName); |
|
| 437 | ||
| 438 | // handle the setting of ONE-TO-MANY relation values |
|
| 439 | if ($prop->getRelationType() == 'ONE-TO-MANY') { |
|
| 440 | $this->BO->set($propObj->name, $this->BO->getOID()); |
|
| 441 | } |
|
| 442 | } |
|
| 443 | } |
|
| 444 | } |
|
| 445 | } catch (IllegalArguementException $e) { |
|
| 446 | self::$logger->warn('Bad data stored in the table ['.$this->BO->getTableName().'], field ['.$propObj->name.'] bad value['.$row[$propObj->name].'], exception ['.$e->getMessage().']'); |
|
| 447 | } catch (PHPException $e) { |
|
| @@ 427-443 (lines=17) @@ | ||
| 424 | $properties = $reflection->getProperties(); |
|
| 425 | ||
| 426 | try { |
|
| 427 | foreach ($properties as $propObj) { |
|
| 428 | $propName = $propObj->name; |
|
| 429 | ||
| 430 | if (isset($row[$propName])) { |
|
| 431 | // filter transient attributes |
|
| 432 | if (!in_array($propName, $this->BO->getTransientAttributes())) { |
|
| 433 | $this->BO->set($propName, $row[$propName]); |
|
| 434 | } elseif (!$propObj->isPrivate() && $this->BO->get($propName) != '' && $this->BO->getPropObject($propName) instanceof Relation) { |
|
| 435 | $prop = $this->BO->getPropObject($propName); |
|
| 436 | ||
| 437 | // handle the setting of ONE-TO-MANY relation values |
|
| 438 | if ($prop->getRelationType() == 'ONE-TO-MANY') { |
|
| 439 | $this->BO->set($propObj->name, $this->BO->getOID()); |
|
| 440 | } |
|
| 441 | } |
|
| 442 | } |
|
| 443 | } |
|
| 444 | } catch (IllegalArguementException $e) { |
|
| 445 | self::$logger->warn('Bad data stored in the table ['.$this->BO->getTableName().'], field ['.$propObj->name.'] bad value['.$row[$propObj->name].'], exception ['.$e->getMessage().']'); |
|
| 446 | } catch (PHPException $e) { |
|