- Added a LoadRelation for the repository.
- Added a new @Filter() annotation to the relation; adding it to JOIN is also coming. - Some bugfixes done within the Where and ConditionTrait.
This commit is contained in:
1 parent
9e84bd3536
commit
7dd64abf29
6 files changed
+136
-24
No files matched your search
@@ -12,7 +12,9 @@ class Where implements \Ulmus\Annotation\Annotation {
|
||||
|
||||
public string $operator;
|
||||
|
||||
public function __construct(? string $field = null, $value = null, ? string $operator = null)
|
||||
public string $condition;
|
||||
|
||||
public function __construct(? string $field = null, $value = null, ? string $operator = null, ? string $condition = null)
|
||||
{
|
||||
if ( $field !== null ) {
|
||||
$this->field = $field;
|
||||
@@ -22,11 +24,7 @@ class Where implements \Ulmus\Annotation\Annotation {
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
if ( $operator !== null ) {
|
||||
$this->operator = $operator;
|
||||
}
|
||||
else {
|
||||
$this->operator = Query\Where::OPERATOR_EQUAL;
|
||||
}
|
||||
$this->operator = $operator !== null ? $operator : Query\Where::OPERATOR_EQUAL;
|
||||
$this->condition = $condition !== null ? $condition : Query\Where::CONDITION_AND;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user