aspose file tools
The moose likes Blog around the Campfire and the fly likes Simple Hibernate Example with Enums Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Other » Blog around the Campfire
Bookmark "Simple Hibernate Example with Enums" Watch "Simple Hibernate Example with Enums" New topic

Simple Hibernate Example with Enums

Christopher Rygaard
Ranch Hand

Joined: Feb 22, 2014
Posts: 42
Simple Enum Example

This is the simplest stand-alone Hibernate Enum example I could cook up.

The interesting part is the annotation on MyPersistentObject._myEnum. Also notice that I don't need to register the Enum with Hibernate (eg. call addAnnotatedClass(...)).

Notice: This is provided with no warranty whatsoever. Use at your own risk.

This is the Enum:

This is the class that has an instance of the Enum:

This is how I use it:
I agree. Here's the link:
subject: Simple Hibernate Example with Enums
It's not a secret anymore!