Monthly Archives: November 2013

Hibernate example 2 – one-to-many associations

Just put an example of how to use one-to-many associations with Hibernate on Github: https://github.com/hedleyproctor/hibernate-one-to-many Shows two examples of a one-to-many relationship between entities: Unordered one-to-many between Customer and Address. Ordered one-to-many between Customer and PaymentCard. The unordered association uses … Continue reading

Posted in Hibernate, Java | Tagged , | Leave a comment

Hibernate example 1 – inheritance and polymorphism

Have just put an example on Github of how to handle inheritance and polymorphism with Hibernate: https://github.com/hedleyproctor/hibernate-polymorphism It demonstrates the four ways of dealing with inheritance and polymorphism: Implicit polymorphism – no explicit mapping of the inheritance, but Hibernate can … Continue reading

Posted in Hibernate, Java | Tagged , | Leave a comment