Cause
This error occurs if your application code attempts to reference a non-shared transient object from a shared transient object. This can be caused directly, by assigning a non-shared transient reference to the property of a shared transient object, or indirectly, by assigning a shared transient reference to the property of a non-shared transient object where an inverse exists back to the shared transient object (which results in an attempt to assign a reference to the non-shared transient on the shared transient object).
Action
Change your application code so that shared transient objects do not reference non-shared transient objects.
You can use the
Where no inverse references exist, a shared transient object can reference persistent or other shared transient objects but not non-shared transient objects.
Where no inverse references exist, a non-shared transient object can reference persistent and both shared and non-shared transient objects.
Where inverse references exist (and the option to allow non-shared transient to shared transient inverse reference is not enable by the allowTransientToSharedTranInvs method, as above), the objects involved must both be persistent, both shared transient, or both be non-shared transient. A mixture of transient and persistent objects results in this error.