You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
love your database libraries. Unfortunately I cannot do a Pull request.
I have a few issues to report which you might be interested in:
Issue 1:
Opis\ORM\Core\DataMapper->setColumn()
When calling the function with the same value as already set previously I expect $orm->wasModified() to return false not true.
My "dirty fix" looks like that:
public function setColumn(string $name, $value)
{
.....
if (isset($this->rawColumns[$name])){
if($this->rawColumns[$name] == $value){
return;
}
}
$this->modified[$name] = 1;
unset($this->columns[$name]);
$this->rawColumns[$name] = $value;
}
Issue 2:
some parts of the IDE auto completion do not work especially when querying from the orm object:
(Using netbeans 12.2)
$orm->query(test::CLASS)-> this works for most cases, get() does not work.
$orm->query(test::CLASS)->withSoftDeleted(true)-> limited only, no get() etc.
$orm->query(test::CLASS)->where(...)->like(...)-> not working at all
I found out changing some traits to public instead of protected does the thing. Don´t know if this is a change you want to do or not.
If nothing of this is in your interest, just close the issue.
Br
The text was updated successfully, but these errors were encountered:
The behavior is correct even though the method's name might be a little bit misleading, and the documentation doesn't help either. When you set a value on an entity object, the object is considered to be modified, regardless of the value you set. We have good reasons for keeping things the way they are.
My "dirty fix" looks like that:
By not using the strict comparison operator, type juggling will occur, which might lead to some serious bugs or security issues.
var_dump("8ball" == 8); //bool(true)
We are using PHPStorm as our default IDE, and the autocompletion is stellar. Before switching to PHPStorm, we were also using Netbeans, but now we would never switch back. I can imagine that the coding experience is poor without proper autocompletion, but this is something that Netbeans must fix.
Hi,
love your database libraries. Unfortunately I cannot do a Pull request.
I have a few issues to report which you might be interested in:
Issue 1:
Opis\ORM\Core\DataMapper->setColumn()
When calling the function with the same value as already set previously I expect $orm->wasModified() to return false not true.
My "dirty fix" looks like that:
Issue 2:
some parts of the IDE auto completion do not work especially when querying from the orm object:
(Using netbeans 12.2)
$orm->query(test::CLASS)-> this works for most cases, get() does not work.
$orm->query(test::CLASS)->withSoftDeleted(true)-> limited only, no get() etc.
$orm->query(test::CLASS)->where(...)->like(...)-> not working at all
I found out changing some traits to public instead of protected does the thing. Don´t know if this is a change you want to do or not.
If nothing of this is in your interest, just close the issue.
Br
The text was updated successfully, but these errors were encountered: