Fully working Hibernate mapping