incubator-isis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Iain Flynn <flyn...@cs.man.ac.uk>
Subject Re: Trouble with relationships - "Object already persisted"
Date Fri, 17 Jun 2011 13:32:21 GMT
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


Mime
View raw message