Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Enhancement using ENum literals in HQL queries...
[Teneo] Enhancement using ENum literals in HQL queries... [message #606827] Wed, 30 May 2007 11:06
Eclipse UserFriend
Say you have an MLBTeam Enum with literals:
MLBTeam.YANKEES_LITERAL
MLBTeam.REDSOX_LITERAL

If Teneo's Enum UserType for Hibernate implemented
org.hibernate.usertype.EnhancedUserType
Then you could specify a query like:
"FROM Players WHERE player.team = MLBTeam.YANKEES_LITERAL"

Right now you have to use parameter substitution or construct the query
String above on the fly.
Perhaps there is some way to do this already that I don't know about.

Also, is there a way to using an integer column instead of a String column
when storing enumeration values in a DB column?
Thanks,
-mike
Previous Topic:Trouble using 'embedded' annotation
Next Topic:[Teneo] Cannot override EntityMapper
Goto Forum:
  


Current Time: Sun Jul 13 23:33:57 EDT 2025

Powered by FUDForum. Page generated in 0.04039 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top