Fixed hibernate support. Explore generic dao support later.