SEAM: Entity Inheritance

I will make a comparison on how the SEAM (Hibernate) framework and Rails framework handles model inheritance.

This first article is about SEAM.

There are 3 ways of implementing this in Hibernate, as explained here and http://simsonlive.wordpress.com/2008/03/09/how-inheritance-works-in-hibernate/:

Strategy 1: One table per subclass

http://www.developpez.net/forums/d486685/java/general-java/persistance/jpa/heritage-strategy-inheritancetype-joined/

Strategy 2: One Table per class herarchy

http://www.seamframework.org/Community/HowToDealWithApplicationFrameworkAndEntityInheritance

Strategy 3: One table per concrete class

The interesting question is how to map (implement) those relationships in Jboss SEAM. I will later edit this post after i have tried the sollutions above 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: