Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Using enum property value in query annotation

Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i use spring boot 2.3.2 with spring data and hibernate.

I have a Enum

I have an enitty

In my repository i tried theses solutions without success

If I do like that that working

I see some thread like this one: who have similar issue.

Saloon Keeper
Posts: 22479
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing to do with Spring Boot, and if you're using Hibernate JPA with Spring Data, even the "Hibernate" part doesn't really matter, because it's a JPA thing.

Look here:

The big problem with enumerations is that most databases don't support enumerations as a basic field type. So the JPA layer has to bridge the difference, and that's what the above mechanism is for.
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic