public function getAffectedRowData()
    {
        $data = array();

        $description = $this->getEntityDescription();

        switch ($this->getEntityState()) {
            case AnDomain::STATE_NEW :
                //get all the serializable property/value pairs
                foreach ($description->getProperty() as $name => $property) {
                    if ($property instanceof AnDomainPropertySerializable) {
                        $data[$name] = $name;
                    }
                }
                //@TODO why are we forcing to unset the property
                //unset($data[$description->getIdentityProperty()->getName()]);
                break;
            case AnDomain::STATE_MODIFIED :
                //get all the updated serializable property/value pairs
                $data = array_keys($this->_modified);
                break;
            case  AnDomain::STATE_DELETED :
                break;
            default :
                return $data;
        }

        $tmp = array();

        foreach ($data as $name) {
            $value = $this->get($name);
            $property = $description->getProperty($name);
            $tmp = array_merge($tmp, $property->serialize($value));
        }

        $data = $tmp;

        if ($description->getInheritanceColumn() && $this->getEntityState() == AnDomain::STATE_NEW) {
            $data[(string) $description->getInheritanceColumn()] = (string) $description->getInheritanceColumnValue();
        }

        return $data;
    }
public function getAffectedRowData()
    {
        $data = array();

        $description = $this->getEntityDescription();

        switch ($this->getEntityState()) {
            case AnDomain::STATE_NEW :
                //get all the serializable property/value pairs
                foreach ($description->getProperty() as $name => $property) {
                    if ($property instanceof AnDomainPropertySerializable) {
                        $data[$name] = $name;
                    }
                }
                //@TODO why are we forcing to unset the property
                //unset($data[$description->getIdentityProperty()->getName()]);
                break;
            case AnDomain::STATE_MODIFIED :
                //get all the updated serializable property/value pairs
                $data = array_keys($this->_modified);
                break;
            case  AnDomain::STATE_DELETED :
                break;
            default :
                return $data;
        }

        $tmp = array();

        foreach ($data as $name) {
            $value = $this->get($name);
            $property = $description->getProperty($name);
            $tmp = array_merge($tmp, $property->serialize($value));
        }

        $data = $tmp;

        if ($description->getInheritanceColumn() && $this->getEntityState() == AnDomain::STATE_NEW) {
            $data[(string) $description->getInheritanceColumn()] = (string) $description->getInheritanceColumnValue();
        }

        return $data;
    }
public function getAffectedRowData ( ) { $ data = array ( ) ; $ description = $ this -> getEntityDescription ( ) ; switch ( $ this -> getEntityState ( ) ) { case AnDomain :: STATE_NEW : //get all the serializable property/value pairs foreach ( $ description -> getProperty ( ) as $ name => $ property ) { if ( $ property instanceof AnDomainPropertySerializable ) { $ data [ $ name ] = $ name ; } } //@TODO why are we forcing to unset the property //unset($data[$description->getIdentityProperty()->getName()]); break ; case AnDomain :: STATE_MODIFIED : //get all the updated serializable property/value pairs $ data = array_keys ( $ this -> _modified ) ; break ; case AnDomain :: STATE_DELETED : break ; default : return $ data ; } $ tmp = array ( ) ; foreach ( $ data as $ name ) { $ value = $ this -> get ( $ name ) ; $ property = $ description -> getProperty ( $ name ) ; $ tmp = array_merge ( $ tmp , $ property -> serialize ( $ value ) ) ; } $ data = $ tmp ; if ( $ description -> getInheritanceColumn ( ) && $ this -> getEntityState ( ) == AnDomain :: STATE_NEW ) { $ data [ ( string ) $ description -> getInheritanceColumn ( ) ] = ( string ) $ description -> getInheritanceColumnValue ( ) ; } return $ data ; }
This method is used to return an array of entity row data that have either
been changed or are new.

@return array
This method is used to return an array of entity row data that have either been changed or are new .