Git repo for Matthew Farwell's blog hibernate-generic
Java
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.settings
src/main
.classpath
.project
README
pom.xml

README

This is the source code for my blog entry on the problems with hibernate & generics:

http://randomallsorts.blogspot.com/2011/06/generic-weirdness-in-java.html

To compile it, either import it into Eclipse as a maven or existing project, and run App.main, or run

mvn compile

and run App.main from the command line.

There are two hibernate mappings for the same table: history-long & history-object, which for which Generic.testIt returns true & false respectively.

The EntryLong code comes after this in the main method. If you're not interested in the hibernate stuff,
just delete the references to Generic in the main method.