This project shows off an auction system, with a non-trivial class hierarchy. It uses several JPA annotations to instruct Hibernate on how to properly persist its state.
Furthermore, the unit tests contain examples of how data in the database may be queried and manipulated.