on 02-06-2018 4:31 PM
I have two extensions extA and extB.
I have an item item1 defined in both extA and extB.
extB defines a dynamic attribute on item1 and the associated bean.
I want to remove extB from my project because it represents a feature I don't need anymore.
Then I got errors
cannot find spring bean [xxxx] configured for dynamic attribute [item1.dynamicAtt] from extension [extB]
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'xxxxHandler' available
To fix this I need to clean myself attribute descriptors using :
DELETE FROM attributedescriptors WHERE (p_extensionname ='extB')
For me this action should be done by the update process. I don't understand why this link is not cleaned? Basically this issue make the concept of extensions useless since you can't remove them easily...
The update process does not remove:
item instances
attributes
If the first problem can be easily solved by running the type system cleanup, then the latter one is not that straight-forward. Given your example, I agree, that removal of attribute descriptors would be the expected behaviour without removing the actual columns (that should be done manually by DBA taking into account table size, removal strategy to reduce locking issues, data to be deleted, and other aspects).
Btw, this is one of the reasons why I consider dynamic attributes to be potentially harmful (and thereby undesired) - removing such an attribute might break the application after system update. To mitigate that you have to create projectdata or essentialdata script that removes the attribute descriptor bulk belonging to the removed extension.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Indeed there is no pb on item level. The issue is that attributedescriptors can't be removed with impex since they have no item representation. It's a bean persisted on DB. So you can't include that in projectdata/essentialdata afaik. But you're right dynamic attribute is potentially a source of problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.