Testing Many-To-Many Mapings

Using the classes found here, JUnit test reading and writing Client and Account objects to and from the database.

You need to update your hibernate.cfg.xml file to include the new Account mapping

You will notice that deleting a client, with shared accounts, deletes those account from other clients. Here is the fix.