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

PostgreSQL findFriendships method issue #25

Closed
davidavz opened this issue May 18, 2016 · 2 comments
Closed

PostgreSQL findFriendships method issue #25

davidavz opened this issue May 18, 2016 · 2 comments

Comments

@davidavz
Copy link
Contributor

I'm using this package with PostgreSQL and this is my error when i call findFriendships() method

SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: smallint ~~ unknown
LINE 1: select * from "friendships" where "status" LIKE $1 and (("se...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "friendships" where "status" LIKE 1 and (("sender_id" = 1 and "sender_type" = App\User) or ("recipient_id" = 1 and "recipient_type" = App\User)))

It seems that we can't use the LIKE operator on a smallint column type isn't it?

@hootlex
Copy link
Owner

hootlex commented May 20, 2016

I haven't test the package with PostgreSQL yet, I'll do it when I find some time and try to fix it.
Sorry for my late response, I was on vacation :)

@hootlex
Copy link
Owner

hootlex commented May 23, 2016

To achieve compatibility with PostgreSQL I've entirely removed LIKE operator from the query.
V1.0.16 can be used with PostgreSQL. Thanks.

@hootlex hootlex closed this as completed May 23, 2016
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

2 participants