Skip to content

Commit

Permalink
Allow calling updateAll with skip_default_objects = false so defaultO…
Browse files Browse the repository at this point in the history
…bject is not called.

git-svn-id: http://voip.null.ro/svn/ansql/trunk@250 dbfed7de-b0aa-0410-b6a1-c7e608b77fc9
  • Loading branch information
monica committed Aug 29, 2016
1 parent ab42287 commit 195fdf1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -2546,9 +2546,10 @@ public function getDbIdentifier()

/**
* Update the database to match all the models
* @param $skip_default_objects Bool. Default false. If true, just tables will be updated, without calling defaultObject
* @return True if the database was synchronized with all the models
*/
static function updateAll()
static function updateAll($skip_default_objects = false)
{
Debug::func_start(__METHOD__,func_get_args(),"framework");

Expand Down Expand Up @@ -2601,7 +2602,7 @@ static function updateAll()
return false;
}

if(self::$_modified)
if(self::$_modified && !$skip_default_objects)
foreach(self::$_models as $class => $vars) {
$object = new $class;

Expand Down

0 comments on commit 195fdf1

Please sign in to comment.