Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] : VersionPropertyHandler returns null for dettached objects
[Teneo] : VersionPropertyHandler returns null for dettached objects [message #606999] Sat, 16 June 2007 15:57
Duncan Alexander is currently offline Duncan AlexanderFriend
Messages: 90
Registered: July 2009

I think the VersionPropertyHandler
( pertyHandler) may be causing me problems
in that it is returning null values when I attempt to reattach a dettached object.

If I create a new version of an object and assign it the same ID as one persisted in the DB, then
this should act in the same way as an object which has been retireved from persistent storage in
another session. But if I do this through Teneo it throws an error like:

at org.hibernate.engine.Versioning.increment( 8)
org.hibernate.event.def.DefaultFlushEntityEventListener.getN extVersion(
org.hibernate.event.def.DefaultFlushEntityEventListener.sche duleUpdate(
org.hibernate.event.def.DefaultFlushEntityEventListener.onFl ushEntity(
org.hibernate.event.def.AbstractFlushingEventListener.flushE ntities(
org.hibernate.event.def.AbstractFlushingEventListener.flushE verythingToExecutions(
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(De
at org.hibernate.impl.SessionImpl.flush(
at stCreatingNewVersionOfExistingCategoryAndUpdating(HibernateT
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStar

I can see from debugging the Teneo classes that the VersionPropertyHandler class is attempting to
look up version numbers for the dettached objects and is returning null. It does however
successfully return 0 as the version for new objects.

Is the VersionPropertyHandler acting correctly in assuming that there should always be a version
number in its IdentifierCacheHandler for dettached objects ? It seems that it should be checking for
versions in the DB if it finds that an object already exists.


Previous Topic:[TENEO] Hibernate update exception when updating existing data
Next Topic:[Teneo] Dynamic classes are mapped as static/generated
Goto Forum:

Current Time: Mon Jan 25 14:24:29 GMT 2021

Powered by FUDForum. Page generated in 0.02151 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top