Sorry for the slow response on this. I am trying to clear some tasks so I can give this issue some more focus.
In the mean time, a couple of comments.
1. I should have been a bit less specific about asking you to make your OneToOne mappings LAZY. What I should have said is for you to try to make you ToOne mappings lazy. (OneToOne and ManyToOne). It may be worth doing that, as there is a chance it will provide a workaround.
2. the call to flush is the best way (short of commit) to get ids for your objects
3. My initial thought is that this issue isn't due to the size of your cache. I believe it comes from the sheer number of detached objects you are merging. It looks like there may be a locking issue in TopLink Essentials when complex objects that refer to common objects are merged.
4. If you are cascading your merges, an alternate workaround could be to individually merge the objects in the object tree your self.
[Message sent by forum member 'tware' (tware)]
http://forums.java.net/jive/thread.jspa?messageID=247236