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

CASE-WHEN in Hibernate

 
Siva Prasad Reddy Katamreddy
Ranch Hand
Posts: 32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Report post to moderator
HI,

Suppose i have a statement written in JDBC as:

SELECT CASE status WHEN 'ACTIVE' THEN '1' WHEN 'PASSIVE' THEN '2' END STATUS_FLAG FROM EMPLOYEE

How to implement this kind of CASE-WHEN type of conditions in Hibernate?

Thanks,
Siva.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Report post to moderator
The other solution is cleaner, easier, and more extensible.
 
Siva Prasad Reddy Katamreddy
Ranch Hand
Posts: 32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Report post to moderator
The other solution is cleaner, easier, and more extensible.


What is that solution??

Thanks,
Siva
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Report post to moderator
The one we're discussing in your other post about the same thing.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
And this is why we request a question be kept in one thread. Locking this one. Please continue discussion in your other thread.
 
    Bookmark Topic Watch Topic
  • New Topic