Teneo 1.0.4 & DeleteCommand [message #620962] |
Wed, 20 May 2009 11:14 |
Matt Biggs Messages: 71 Registered: July 2009 |
Member |
|
|
I'm currently having problems with my DeleteCommand failing after
upgrading to Teneo 1.0.4.
I've done a bit of digging around, and believe its due to the following:
In ComposedAdapterFactory the adapt(Notifier target, Object type, boolean
isNew) method calls delegateAdapterFactory.adapt(target, type)
which in turn calls AdapterFactoryImpl.adapt(Notifier target, Object type)
method.
Previously within this method the target.eAdapters() collection would be
empty so a new Adapter is created.
This would be my EObjects ItemProvider.
When we return to the adapt() method of ComposedAdapterFactory it does an
instanceof check.
if (!(type instanceof Class) || ((Class<?>)type).isInstance(adapter))
{
return adapter;
}
My EObjects ItemProvider passes this and it is returned sucessfuly.
In teneo 1.0.4 the eAdapter collection contains a
HibernatePersistentStoreAdapter. This fails the instanceof
check and 'null' is returned instead. A new ItemProviderAdapter is created
and then my DeletCommand no longer works.
|
|
|
Powered by
FUDForum. Page generated in 0.03168 seconds