Can you use zombodb with paged JPA?

17 views
Skip to first unread message

James Shoemaker

unread,
Sep 5, 2021, 12:37:11 PM9/5/21
to ZomboDB
   I'm trying to use zombodb with a jpa paged query.  This involves building a query that ends up being PREPARED on postgres.  This ends up giving a error:

HINT:  No operator matches the given name and argument types. You might need to add explicit type casts.

you can simulate this without JPA by doing something like:

PREPARE fred (varchar) AS SELECT * from jukebox.songs WHERE songs ==> $1;
EXECUTE fred("searchstring");

where jukebox.songs is the indexed table.

the PREPARE statement errors with the above error.

Any ideas for a solution?

James Shoemaker

James Shoemaker

unread,
Sep 5, 2021, 12:38:01 PM9/5/21
to ZomboDB
oops. here's the full error:

ERROR:  operator does not exist: songs ==> character varying
LINE 1: ...(varchar) AS SELECT * from jukebox.songs WHERE songs ==> $1;
                                                                ^
HINT:  No operator matches the given name and argument types. You might need to add explicit type casts.


James Shoemaker

unread,
Sep 5, 2021, 12:39:03 PM9/5/21
to ZomboDB
NVM I think I found the issue.

James Shoemaker

unread,
Sep 5, 2021, 12:57:24 PM9/5/21
to ZomboDB
nope, it works if I put text as the type of the prepare, but I haven't figured out how to make JPA set the parameter to text
Reply all
Reply to author
Forward
0 new messages