Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPDATE Multiple rows doesn't work at all #304

Open
thekayshawn opened this issue Feb 4, 2024 · 0 comments
Open

UPDATE Multiple rows doesn't work at all #304

thekayshawn opened this issue Feb 4, 2024 · 0 comments

Comments

@thekayshawn
Copy link

thekayshawn commented Feb 4, 2024

Version: 3.1

Bug Description

Update multiple, both in core and explorer, doesn't work at all and has really poor documentation, the docs never even mention how to accomplish and the execution gives weird errors such as "Unexpected type array" when the function's PhpDoc clearly says it expects an array. Following is my code:

$this->database->table('questions')->where('id', $ids)->update($questions);

Doesn't matter if $questions is an array or an object or is defined right here instead of being stored in a variable, the same error is thrown, precisely: Nette\InvalidArgumentException: Unexpected type of parameter: array in \Database\SqlPreprocessor.php:316

Edit: The forum's authentication system is bugged and, I believe, many questions are posted here instead of the forum as a consequence.

Steps To Reproduce

Jumpstart a Nette app and try updating multiple rows at once.

Expected Behavior

Multiple rows should be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant