Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.0.0ALPHA1
-
Fix Version/s: 1.0.0ALPHA1
-
Component/s: None
-
Labels:None
-
Environment:OS X, latest ODM checkout
Description
/** @MappedSuperclass */
class Model {
private $errors = array();
protected function getErrors() {
return $this->errors;
}
}
/**
* @Document(db="mydb", collection="data")
*/
class Data extends Model {
/**
* @Id
*/
public $id;
/**
* @String
*/
public $name;
}
Did not expect, that $errors goes into mongo.
This is expected behavior. It was changed so that all properties are persisted unless specified otherwise. Map the property is @Transient and it will be ignored by Doctrine:
class MyDocument { // ... /** @Transient */ private $errors = array(); }