Wait, you didn't show the map to the second table.
Did you try generator="assigned" for the 2nd table? See
http://www.hibernate.org/hib_docs/refer ... d-assigned
Actually the doc it says "...you have to explicitly specify to Hibernate if the object should be saved or updated by calling either the save() or update() method of the Session. " so I'm not sure if there's a one-line solution.. Probalby you will have to try loading it, and if it's there, do an update() otherwise a save(). But this might wreak havoc on the internal Hibernate object cache.
Maybe a more expert opinion is required...