function __construct($table = NULL, $key = NULL)
{
parent::__construct();
$this->table = str_replace('table.', __DBPREFIX__, $table ? $table : 'table.' . str_replace('_model', '', mgClassNameToFileName(get_class($this))));
$this->clearArgs();
$this->key = $key ? $this->table . "." . $key : $this->findPrimaryKey();
}