v1

tested on hibernate.cfg.xml. One bug remains