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

Bugs with postgres #16

Open
bastienEichenberger opened this issue Feb 5, 2014 · 3 comments · May be fixed by #17
Open

Bugs with postgres #16

bastienEichenberger opened this issue Feb 5, 2014 · 3 comments · May be fixed by #17

Comments

@bastienEichenberger
Copy link

Hi all,

I have a lots of bugs with postgres. The problem come from the boolean type:
SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type boolean: ""

If I replace true argument with 0 it's works! For example:
public function findAllTopicsStickiedByBoardId($boardId, $canViewDeletedTopics = false)
// $params = array(':boardId' => $boardId, ':isSticky' => true); // this ligne throw an exeption
// if we replace true -> 0 its work
$params = array(':boardId' => $boardId, ':isSticky' => 0);

Can anyone tell me how to solve this problem? I can replace all boolean with 0/1 but I would like to find the best way to solve this problem…

Thanks!

@mablk
Copy link

mablk commented Mar 5, 2014

Same problem here.

It seems to be described here: http://stackoverflow.com/questions/11413752/doctrine2-and-postgres-invalid-input-syntax-for-boolean

@reecefowell
Copy link
Member

@MMGT i am unable to work on this right now, would you be able to send a PR for this please?

I have just started a new job so i don't have the time i used to have available to me. If not, i will probably get around to it, but it will take a week or so, maybe more, as i have a lot of other things to sort out.

@bastienEichenberger
Copy link
Author

@MMGT I'm a beginner with symfony2 but I found a solution and now the bundle works fine with postgresql...
I overrided the bundle and add some modification to:
Model/Component/Repository/CategoryRepository.php
Model/Component/Repository/TopicRepository.php
I remplaced boolean (true/false) by (1/0)...

I hope it helps.

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

Successfully merging a pull request may close this issue.

3 participants