>when an exception is catched, discard the session don't flush
Anthony, This I know, that is why I said the code was incorrect.
But my question is:
Why does the flush after OUT OF MEMORY do this (see below) to the data?
The columns where NOT NULL *BEFORE* before the out of memory and flush.... This was totally unexpected.
You will notice the the VERSION column is being incremented.
The sample code *does not* modify any data.
I know how to fix this (i.e don't flush), but I just want to understand what is happening and are there other cases where hibernate might do this?
<from mysql bin log>
update PROJECTS_DB3 set version=590, userName=null, guid=null, event=null, projectName=null, ID_Secondary=null, ID_Production=null, archiveId=null, ID_Additional=null, projectTitle=null, Title_Secondary=null, Title_Production=null, Title_Archive=null, Title_Additional=null, description=null, Description_Secondary=null, Description_Sound=null, Description_Archive=null, Description_Subject=null, Description_Additional=null, comment=null, keywords=null, createDate=null, Date_Due=null, projectStartDate=null, lastModifyTime=null, Date_Completed=null, broadcastDate=null, lastBroadcastDate=null, Date_Repeat=null, NumberRepeats=0, Date_Accessed=null, Date_Archived=null, inciteIdbPath=null, ipcFilePath=null, Location_Tape=null, Location_Geographical=null, Location_Recording=null, Location_Additional=null, destinationProgram=null, destinationChannel=null, projectCreator=null, editor=null, News_Editor=null, Editor_in_Chief=null, Photographer=null, Reporter=null, Presenter=null, Participants=null, Additional_Person=null, journalist=null, assignedTo=null, Language=null, Medium=null, Format_Standards=null, Film_Type=null, Sound_Type=null, VersionInfo=null, Category=null, Addition_Info=null, projectGroup=null, status=null, Project_Priority=null, User_Project_Priority=null, projectOrigin=null, projectEventType='Project', parentProjectGuid=null, archiveStatus=null, archiveTapeId=null, archiveTapeDesc=null where dbId=1 and version=589;
|