Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate query using a custom user type

 
David Irwin
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,

I'm trying to create a Hibernate query. Here's my named query that works so far that I define in my mapping file:



What I'm trying to add is the following:
* there's an object in the AlarmInfo class called "level" that I map as a custom Hibernate user type (it implements org.hibernate.usertype.UserType).
* I only want to retrieve an alarmInfo object if it's alarmInfo.level is in a collection of alarm levels.

I tried to do the following:



This, however, doesn't seem to work. I feel like since the "level" is mapped as a Hibernate UserType I should be doing something differently. Any ideas?

Thanks,
Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic