EXCEPTION [TOPLINK-6004](TopLink - 9.0.3.3 (Build 430)): oracle.toplink.exceptions.QueryException EXCEPTION DESCRIPTION: The object[[com.ffab.farm.model.property.zDisruptionPercentCoverage], with identity hashcode (etc)], is not from this UnitOfWork object space, but the parent session's. The object was never registered in this UnitOfWork, but read from the parent session and related to an object registered in the UnitOfWork. (For help read manual, see FAQ, etc)It's bad enough having Toplink mad at me, but now my manager is mad as well. I've tried reading the manual but I was unable to find an example code that seemed at all relevant. I've got no real exposure to Toplink (and enough Java merely to be dangerous).
private DisruptionofFarmingOpsIf disruptFarmOps = null;In the body of the code I have
// If the location changed causing the Disruption of Farming Operations // Percent of Coverage options to change, revert Percent Coverage to lowest legal value // (Rich Pupko 9/30/2005) disruptFarmOps =(DisruptionofFarmingOpsIf) getTransaction().getPropertyCoveragePart(). getOptionalPropertyCoverage("Disruption of Farming Ops"); if (disruptFarmOps != null){ if (disruptFarmOps.hasDisruptExceptions()== false){ if (disruptFarmOps.getZDisruptionPercentCoverage() .getPercentofCoverage().compareTo("60%") <= 0){ disruptFarmOps.setZDisruptionPercentCoverage (FarmApp.singleton() .getReferenceData() .getZDisruptionPercentCoverage("70%") ); } } }The snippet above was lifted from a different class, where it actually does work. I still don't know how it gets registered in the UnitOfWork.