Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Do not filter values in AbstractCreationalQuery #113

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

Merged
nilportugues merged 1 commit into nilportugues:master from makeey:master
Apr 7, 2020
Merged

Do not filter values in AbstractCreationalQuery #113

nilportugues merged 1 commit into nilportugues:master from makeey:master
Apr 7, 2020

Conversation

Copy link
Contributor

@makeey makeey commented Mar 5, 2020

Hi @nilportugues !

Thank you for your great package, I really enjoy using it.

I have a problem with a query when my query should contain something which is not == to true (except the "0").
For example, I have a table which has the next structure:

CREATE TABLE IF NOT EXISTS `Example`
(
 `Id` int(1) NOT NULL,
 `Tittle` VARCHAR(255) NOT NULL,
 `Description` LONGTEXT NULL DEFAULT NULL,
 `IsSomething` bool not null default TRUE,
) ENGINE = InnoDB;

The problem is the description was set you can't set it to null anymore, and also you can't change IsSomething on false.

Reproduce the issue:

$genericBuilder = new GenericBuilder();
echo $genericBuilder->write(
 $genericBuilder->update()
 ->setTable('Example')
 ->setValues([
 'Title' => "example title",
 'isSomething' => false,
 'Description' => null
 ])
 ->where()
 ->equals('id', 5)
 ->end()
);
// ACTUAL: UPDATE Example SET Example.Title = :v1 WHERE (Example.id = :v2)
// EXPECTED: UPDATE Example SET Example.Title = :v1, Example.isSomething = :v2, Example.Description = :v3 WHERE (Example.id = :v4)

The issue was occurred before in the issue #82 but wasn't completely solve, only the integer case.
Also a related issue: #92

mintobit reacted with thumbs up emoji
Copy link
Contributor Author

makeey commented Mar 27, 2020

Hi, @nilportugues have you had a chance to take a look at the PR?

@nilportugues nilportugues merged commit b00877e into nilportugues:master Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /