- Added the HAVING and TRUNCATE keyword
- Fixed GroupBy which was not implemented yet - Added a new SQL raw() function - From statement now accepts subqueries
This commit is contained in:
1 parent
538af38769
commit
139504f8dd
17 files changed
+566
-251
No files matched your search
+6
-3
@@ -321,9 +321,9 @@ trait EntityTrait {
|
||||
/**
|
||||
* @Ignore
|
||||
*/
|
||||
public function toCollection() : array
|
||||
public function toCollection() : EntityCollection
|
||||
{
|
||||
return new EntityCollection($this->toArray());
|
||||
return static::entityCollection([ $this->toArray() ]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -377,7 +377,10 @@ trait EntityTrait {
|
||||
*/
|
||||
public static function entityCollection(...$arguments) : EntityCollection
|
||||
{
|
||||
return new EntityCollection(...$arguments);
|
||||
$collection = new EntityCollection(...$arguments);
|
||||
$collection->entityClass = static::class;
|
||||
|
||||
return $collection;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user