Hibernate QuickTip: MappedSuperclass
October 9, 2010 Leave a comment
One of the hibernate tricks for cleaner entities is the @MappedSuperclass annotation. This allows you to specify a set of fields that all of your entities share. Write a class with this annotation at the class declaration level and then make the entities inherit from this class. Without it Hibernate will throw errors.