Opened 14 years ago

Closed 14 years ago

#612 closed defect (fixed)

Add checks in the core so that unsaved objects are not used in queries.

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: minor Milestone: BASE 2.5
Component: core Version:
Keywords: Cc:

Description

This will generate a Hibernate exception similar to:

 net.sf.basedb.core.BaseException: object references an unsaved ransient
 instance - save the transient instance before flushing: net.sf.basedb.core.data.AnnotationSetData
 at net.sf.basedb.core.HibernateUtil.loadData(HibernateUtil.java:1131)
 at
 net.sf.basedb.core.AnnotationSet.findAnnotation(AnnotationSet.java:335)
 at
 net.sf.basedb.plugins.Tab2MageExporter.getExperimentalFactorValues(Tab2M
 ageExporter.java:766)
 at net.sf.basedb.plugins.Tab2MageExporter.run(Tab2MageExporter.java:649)
 at
 net.sf.basedb.core.PluginExecutionRequest.invoke(PluginExecutionRequest.
 java:88)
 at
 net.sf.basedb.core.InternalJobQueue$JobRunner.run(InternalJobQueue.java:
 420)

The AnnotationSet?.findAnnotation() is just one such method that needs a check. There are lots and lots of other places...

Change History (3)

comment:1 Changed 14 years ago by Jari Häkkinen

Milestone: BASE 2.x+BASE 2.5

comment:2 Changed 14 years ago by Nicklas Nordborg

Status: newassigned

comment:3 Changed 14 years ago by Nicklas Nordborg

Resolution: fixed
Status: assignedclosed

(In [3900]) Fixes #612: Add checks in the core so that unsaved objects are not used in queries.

Note: See TracTickets for help on using tickets.