| 
				 public 
				boolean
				
				 | 
			#
			replace( boolean $runValidation = true )
				Replaces the current document. 
				Replaces the current document. NOTE: This will overwrite entire document. Any filtered out properties will be removed as well. The record is inserted as a documnent into the database collection, if exists it will be replaced. Validation will be performed before saving the record. If the validation fails,
the record will not be saved. You can call getErrors()to retrieve the
validation errors. Parameters
						$runValidationwhether to perform validation before saving the record.
If the validation fails, the record will not be saved to database.Returns
						booleanwhether the saving succeeds
 Since
							v1.0
 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			save( boolean $runValidation = true )
				Saves the current document. 
				Saves the current document. The document is inserted into collection if it is not already saved. The
check whether to update or insert document is dony by primary key. Validation will be performed before saving the record. If the validation fails,
the record will not be saved. You can call getErrors()to retrieve the
validation errors. If the record is saved its scenario will be set to be 'update'.
And if its primary key is of type of MongoId, it will be set after save. Parameters
						$runValidationwhether to perform validation before saving the record.
If the validation fails, the record will not be saved to database.Returns
						booleanwhether the saving succeeds
 Since
							v1.0
 Ignored
					 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			upsert( boolean $runValidation = true )
				Updates or inserts the current document. This will try to update existing fields.
Will keep already stored data if present in document. 
				Updates or inserts the current document. This will try to update existing fields.
Will keep already stored data if present in document. If document does not exist, a new one will be inserted. ParametersReturns
						boolean
					 Throws | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			insert( Maslosoft\Addendum\Interfaces\AnnotatedInterface $model = null )
				Inserts a document into the collection based on this active document attributes. 
				Inserts a document into the collection based on this active document attributes. Note, validation is not performed in this method. You may call validate()to perform the validation. After the record is inserted to DB successfully, its  scenario will be set to be 'update'. Parameters
						$modelif want to insert different model than set in constructorReturns
						booleanwhether the attributes are valid and the record is inserted successfully.
 ThrowsSince
							v1.0
 Ignored
					 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			update( array $attributes = null )
				Updates the document represented by this active document.
All loaded attributes will be saved to the database.
Note, validation is not performed in this method. You may call validate()to perform the validation. 
				Updates the document represented by this active document.
All loaded attributes will be saved to the database.
Note, validation is not performed in this method. You may call validate()to perform the validation. Parameters
						$attributeslist of attributes that need to be updated. Defaults to null,
meaning all attributes that are loaded from DB will be saved.Returns
						booleanwhether the update is successful
 ThrowsSince
							v1.0
 Ignored
					 | 
		
			| 
				 public 
				
				
				 | 
			#
			updateOne( array|Maslosoft\Mangan\Interfaces\CriteriaInterface$criteria = null, array $attributes = null, boolean $modify = false )
				Updates one document with the specified criteria and attributes 
				Updates one document with the specified criteria and attributes This is more raw update: 
Does not raise any events or signalsDoes not perform any validation Parameters
						$criteriaquery criteria.$attributeslist of attributes that need to be saved. Defaults to null,
meaning all attributes that are loaded from DB will be saved.$modifytu force update/upsert documentSince
							v1.0
 | 
		
			| 
				 public 
				boolean|mixed[]
				
				 |  | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			delete( )
				Deletes the databse document corresponding to this Document. 
				Deletes the databse document corresponding to this Document. Returns
						booleanwhether the deletion is successful.
 ThrowsSince
							v1.0
 Ignored
					 | 
		
			| 
				 public 
				
				
				 | 
			#
			deleteByPk( mixed $pkValue, array|Maslosoft\Mangan\Interfaces\CriteriaInterface$criteria = null )
				Deletes document with the specified primary key. 
				Deletes document with the specified primary key. Additional $criteriacan be used to filter out which document should be deleted. See find()for detailed explanation about$criteria. Parameters
						$pkValueprimary key value(s). Use array for multiple primary keys. For composite key, each key value must be an array (column name=>column value).$criteriaquery criteria.Since
							v1.0
 Ignored
					 | 
		
			| 
				 public 
				
				
				 | 
			#
			deleteAllByPk( mixed[] $pkValues, array|Maslosoft\Mangan\Interfaces\CriteriaInterface$criteria = null )
				Deletes documents with the specified primary keys. 
				Deletes documents with the specified primary keys. Additional $criteriacan be used to filter out which documents should be deleted. See find()for detailed explanation about$criteria. Parameters
						$pkValuesPrimary keys array$criteriaquery criteria.Since
							v1.0
 Ignored
					 | 
		
			| 
				 public 
				
				
				 | 
			#
			deleteAll( array|Maslosoft\Mangan\Interfaces\CriteriaInterface$criteria = null )
				Deletes documents with the specified criteria. 
				Deletes documents with the specified criteria. Optional $criteriacan be used to filter out which documents should be deleted. See find()for detailed explanation about $criteria. Parameters
						$criteriaquery criteria.Since
							v1.0
 Ignored
					 | 
		
			| 
				 public 
				
				
				 | 
			#
			deleteOne( array|Maslosoft\Mangan\Interfaces\CriteriaInterface$criteria = null )
				Deletes one document with the specified primary keys. 
				Deletes one document with the specified primary keys. Optional $criteriacan be used to filter out which document should be deleted. Does not raise beforeDeleteevent See find()for detailed explanation about $criteria Parameters
						$criteriaquery criteria.Since
							v1.0
 Ignored
					 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			refresh( )
				Repopulates this active document with the latest data. 
				Repopulates this active document with the latest data. Returns
						booleanwhether the row still exists in the database. If true, the latest data will be populated to this active record.
 Since
							v1.0
 Ignored
					 | 
		
			| 
				 public 
				MongoCollection
				
				 | 
			#
			getCollection( )
				Get working mongo collection instance. 
				Get working mongo collection instance. Should not be called manually in most cases. Returns
						MongoCollection
					 Ignored
					 |