Thank you very much, persistIfNotAlready did the trick :) - Iain
On 14 Jun 2011, at 17:56, dan haywood wrote: > Hi Iain, > I might be misunderstanding you, but it sounds like you have a graph of > transient objects. If a transient object is persisted, then it will > automatically walk the graph and persist all other objects - "persistence by > reachability". This might be the reason why your other transient object is > then encountering the "already persisted" error when it in turn attempts to > persist itself. > > Or... maybe you just need to use the > DomainObjectContainer#persistIfNotAlready(Object) rather than > DomainObjectContainer#persist(Object). > > If neither of these suggestions help, could you post some code here and > we'll try to help out. > > Thx > Dan
