Persistence layer – writing entities and configuring Hibernate