This is as per the spec. The behavior you want is available when you do session.saveOrUpdate()
Both have merit.
To expand it a bit. If you expect mostly updates from your graph, saveOrUpdate is good, if you expect mostly unchanges objects in your graph, merge is good.
Hibernate optimize things under the hood (merge profile / batch update), the different does not matters in most cases
OK, so I can use an Hibernate extension to workaround the issue.
I see that the Hibernate doc says that merge() behaves this way (http://www.hibernate.org/hib_docs/entitymanager/reference/en/html_single/#d0e897), but where can I found the EJB3 spec stating this should be the behaviour of merge()? I can't find that being covered in the Sun doc.
It would be nice if the EJB3 spec provided a way of avoiding this inefficiency.