• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate UUID in Select statement

 
Charles Sexton
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having an issue using a query that searches a column of uuid generated values. If I use the query below, it doesn't return anything.



If I go to the command line and use this query it works with the uuid generated value instead of the parameter



What I can't figure out is how to use uuid generated values in queries. I have done research and can't find anything on this topic at all as far as retrieval.
 
Rob Spoor
Sheriff
Posts: 20822
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, you appear to want to match exactly; use = instead of LIKE for that.

Secondly, are you sure it's not the date part of the WHERE clause that causes no results to be returned? Can you try omitting that?
 
Charles Sexton
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried the SQL query with the dates and the parameter, it didn't work. I tried it with one of the uuids instead of the parameter with the date portion and it worked. I'm using MySQL but I'm not sure if that plays a role or not.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!