|
|
@@ -210,7 +210,7 @@ abstract class Entity {
|
|
|
}
|
|
|
|
|
|
public function delete() {
|
|
|
- if (isset($this->_softdelete) && $this->_softdelete) {
|
|
|
+ if (static::_softdelete) {
|
|
|
$this->deleted_at = date('Y-m-d h:m:s');
|
|
|
$this->update();
|
|
|
}else{
|
|
|
@@ -595,8 +595,8 @@ abstract class Entity {
|
|
|
* @param Array $remote_filter Filters to the remote Array('id', Array('>', 50) )
|
|
|
* @param Array $pivot_limits Array( 'offset'=> 10, 'limit' => 10 )
|
|
|
*/
|
|
|
- protected function belongsToManyExtended($foreignObject, $pivot_table, $local_in_pivot, $remote_in_pivot, $remote_filter = Array(), $pivot_limit = Array()) {
|
|
|
- return new BelongsToManyExtended($this, $foreignObject, $pivot_table, $local_in_pivot, $remote_in_pivot, $remote_filter, $pivot_limit);
|
|
|
+ protected function belongsToManyExtended($foreignObject, $pivot_table, $local_in_pivot, $remote_in_pivot, $remote_filter = Array(), $pivot_limit = Array(), $softDelete = true) {
|
|
|
+ return new BelongsToManyExtended($this, $foreignObject, $pivot_table, $local_in_pivot, $remote_in_pivot, $remote_filter, $pivot_limit, $softDelete);
|
|
|
}
|
|
|
|
|
|
/**
|