zend 2在不使用exchangearray()方法的情况下获取实体属性值

I am newbie to zend framewrok 2. I am just practicing album application provided by zf2 documentation. After that i create another controller namely PersonalInfo. In PersonalInfo entity i used a properties namely dt which will be not updated by form input. It is updated by default in database. Here is my Entity.

class PersonalInfo {
protected $id;
protected $name;
protected $fName;
protected $email;
protected $picture;
protected $dt;


public function exchangeArray($data) {
    $this->id = (!empty($data['id'])) ? $data['id'] : null;
    $this->name = (!empty($data['name'])) ? $data['name'] : null;
    $this->fName = (!empty($data['fName'])) ? $data['fName'] : null;
    $this->email = (!empty($data['email'])) ? $data['email'] : null;
    $this->picture = (!empty($data['picture'])) ? $data['picture'] : null;

}

// Add the following method:
public function getArrayCopy() {
    return get_object_vars($this);
}
public function getId() {
    return $this->id;
}

public function setId($id) {
    $this->id = $id;
}

public function getName() {
    return $this->name;
}

public function setName($name) {
    $this->name = $name;
}

public function getFName() {
    return $this->fName;
}

public function setFName($fName) {
    $this->fName = $fName;
}

public function getEmail() {
    return $this->email;
}

public function setEmail($email) {
    $this->email = $email;
}

public function getPicture() {
    return $this->picture;
}

public function setPicture($picture) {
    $this->picture = $picture;
}
public function getDt() {
    return $this->dt;
}

public function setDt($dt) {
    $this->dt = $dt;
}

I am strange if i not use $this->dt= (!empty($data['dt'])) ? $data['dt'] : null; in exchangeArray method then getDt() method return null but if i use that in exchangeArray method than it returns actual data. In my general understanding i am not clear about the trick of exchangeArray method. It is neccessary to know for me because in future to solve this type of problem.

If you take a look at http://framework.zend.com/manual/2.0/en/user-guide/database-and-models.html#using-servicemanager-to-configure-the-table-gateway-and-inject-into-the-albumtable you'll notice that all this information is defined in your factory

'AlbumTableGateway' => function ($sm) {
    $dbAdapter = $sm->get('Zend\Db\Adapter\Adapter');
    $resultSetPrototype = new ResultSet();
    $resultSetPrototype->setArrayObjectPrototype(new Album());
    return new TableGateway('album', $dbAdapter, null, $resultSetPrototype);
}

The part of interest in the definition is the new ResultSet() and the setArrayObjectPrototype() method

If you take a look at \Zend\Db\ResultSet\ResultSet you'll see that the exchangeArray method is required -> https://github.com/zendframework/zf2/blob/master/library/Zend/Db/ResultSet/ResultSet.php#L65

The reason for that requirement is because, as you iterate over your result set, the ResultSet itself clones your prototype, and then calls exchangeArray which effectively 'hydrates' your object with row data -> https://github.com/zendframework/zf2/blob/master/library/Zend/Db/ResultSet/ResultSet.php#L105

So, in summary, when used in the above manner if you don't explicitly set all your properties in the exchangeArray method, they will always remain null when fetched from the db.