- Merge latest commits and added virtual closures too
This commit is contained in:
1 parent
e14a3670fc
commit
724ab250ab
3 files changed
+54
-5
No files matched your search
+6
-2
@@ -9,7 +9,7 @@ use Ulmus\Repository,
|
||||
|
||||
use Ulmus\Annotation\Classes\{ Method, Table, Collation, };
|
||||
use Ulmus\Annotation\Property\{ Field, Filter, FilterJoin, Relation, OrderBy, Where, OrWhere, Join, Virtual, On, WithJoin, };
|
||||
use Ulmus\Annotation\Property\Field\{ Id, ForeignKey, CreatedAt, UpdatedAt, Datetime as DateTime, Date, Time, Bigint, Tinyint, Blob, Text, Mediumtext, Longtext, Tinyblob, Mediumblob, Longblob };
|
||||
use Ulmus\Annotation\Property\Field\{ Id, ForeignKey, CreatedAt, UpdatedAt, Datetime as DateTime, Date, Time, Bigint, Tinyint, Text, Mediumtext, Longtext, };
|
||||
use Ulmus\Annotation\Property\Relation\{ Ignore as RelationIgnore };
|
||||
|
||||
trait EntityTrait {
|
||||
@@ -30,6 +30,10 @@ trait EntityTrait {
|
||||
*/
|
||||
public array $entityLoadedDataset = [];
|
||||
|
||||
public function __construct() {
|
||||
$this->resetVirtualProperties();
|
||||
}
|
||||
|
||||
/**entityLoadedDataset
|
||||
* @Ignore
|
||||
*/
|
||||
@@ -108,7 +112,7 @@ trait EntityTrait {
|
||||
foreach($this->resolveEntity()->properties as $prop => $property) {
|
||||
if ( ! $property['builtin'] ) {
|
||||
foreach($property['tags'] as $tag) {
|
||||
if ( in_array(strtolower($tag['tag']), [ 'relation', 'join' ] ) ) {
|
||||
if ( in_array(strtolower($tag['tag']), [ 'relation', 'join', 'virtual' ] ) ) {
|
||||
unset($this->$prop);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user