Thank you [email protected]. Without your help I would never have
found a solution.
Of course my code was generating the duplicate entry! Sorry to have
bugged the list on this last error.
I'm not sure I understand why different objects must be "localized" with
the localObject method vs the setObjectContext. From my limited
understanding of the inner workings of Cayenne, the setObjectContext
should have worked. I have used the setObjectContext with success (I
think - in the error went away) in other situations when I get an error
suggesting that one object is not in the context of another object
On 03/03/16 03:37 PM, Andrew Willerding wrote:
I had to add newItem before the getObjectContext() to allow the
program to compile and then unfortunately I'm getting the error
below. There shouldn't be any duplicate entries as this is the first
record I'm attempting to insert for this particular project and
contact. The underlying project id is 9999 and the contact id is 1922
so I'm not sure what is generating the duplicate entry.