From 2e463b0877521c28a33568ff6b25a9a2d7fe3aa1 Mon Sep 17 00:00:00 2001 From: Sieciech Date: Sun, 28 Feb 2021 01:06:51 +0100 Subject: [PATCH] test2 --- app/Model/Job.php | 2 -- src/Fufle/ORM/Query.php | 1 - tests/ModelTests.php | 4 ++++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Model/Job.php b/app/Model/Job.php index 698cb5e..911d4b7 100644 --- a/app/Model/Job.php +++ b/app/Model/Job.php @@ -12,9 +12,7 @@ class Job extends BaseModel { public int $id; public float $budget; public static function Initialize() { - echo "init "; if (static::$query === null) { - echo "query "; static::$query = new JobQuery(self::class); } } diff --git a/src/Fufle/ORM/Query.php b/src/Fufle/ORM/Query.php index 0a4367e..2052a56 100644 --- a/src/Fufle/ORM/Query.php +++ b/src/Fufle/ORM/Query.php @@ -5,7 +5,6 @@ class Query { private string $table; private string $primaryKey; public function __construct(string $model) { - //$model = new $class(); $this->table = $model::getTableName(); $this->primaryKey = $model::getPrimaryKey(); } diff --git a/tests/ModelTests.php b/tests/ModelTests.php index d0c4bc9..93106fb 100644 --- a/tests/ModelTests.php +++ b/tests/ModelTests.php @@ -12,4 +12,8 @@ echo " var_dump(Job::Get(10)); echo " +"; +var_dump(Job::GetLast10()) +echo " + "; \ No newline at end of file