Académique Documents
Professionnel Documents
Culture Documents
25-May-15
Log In
Products
Buy
SUPPORT CENTER
Support
Tickets
My Account
Examples
About Us
Localization
FAQ
solution
Training Events
ID:
Q403538
Created O n :
5/23/2012 7:47:13 PM
Mo dified O n :
5/24/2012 6:09:03 PM
B u ild:
v2010 vo l 2.8 / 25-Ap r-2011
H i,
Related Questions
This class also had a baseclass (EventBase) and as such, it's XPObjectType.Oid was used in the EventBase.ObjectType column.
We needed to replace the Event class by a new Event class. The old 'Events' needed to be converted to new 'Events' and as such, the old one was renamed
to InfEvent (to line it up with the name of the database table).
As we knew, we had to update the XPObjectType manually but during conversion of the 'InfEvent' objects to the new 'Event' class, it appeared that XPO
tried to load InfEvent objects from the Event table (which was still empty).
After long investigation, it appears that XPO uses 2 caches for the XPObjectTypes. One of them is in the XPObjectTypesManager (_allTypes) the other one in
BaseDataLayer.StaticData.
Changing the XPObjectType record in the database does not reload these caches, so we looked at
a way to do that manually.
The XPObjectTypesManager cache can be reset by calling a DropIdentityMap.
The Static Data dictionary in BaseDataLayer however, can only be cleared by calling ClearStaticData. This method is protected and the only calling method
is ClearDatabase, something we definitely do not want.
So, in fact there is no normal way to clear this cache without clearing the database.
IMHO, when XPO notices a change in an XPObjectType object, it should have an ability to refresh it's
cache of XPObjects as well, or refresh it automatically.
Thanks,
Marco
P.S. As a workaround, we now call ClearStaticData by using reflection, but of course this is not a good solution.
Leave a Comment
1 Solution
0
Hi Marco,
Thank you for the question. Your scenario is quite unusual and I am afraid we won't publish this internal method. Instead of clering this dictionary or clearing
the dataabse, I recommend that you create a new data layer after your type manipulations.
>>>IMHO, when XPO notices a change in an XPObjectType object, it should have an ability to refresh it's
cache of XPObjects as well, or refresh it automatically.
The XPObjectType class is defined as session-less and does not support change notifications. We have not considered such scenarios when designing the
XPO Library.
https://www.devexpress.com/Support/Center/Question/Details/Q403538
1/2
Q403538 - Provide some method to really update XPObjectTypes | DevExpress Support Center
25-May-15
[C#]
W e w ill mo dify th e U p dateXPO b jectTyp e meth o d to au to matically relo ad XPO b jectTyp e in stan ces in th e fu tu re.
Please let me kn o w if th is h elp s.
Leave a Comment
DEVEXPRESS
About Us
News
Our Awards
Upcoming Events
User Comments
Case Studies
Reviews and Publications
Licensing
Purchasing
MVP Program
Contact Us
Logos
.NET CONTROLS
WinForms
ASP.NET
MVC
WPF
Silverlight
Windows 8 XAML
CROSS PLATFORM
Reporting
Document Automation
MOBILE
DevExtreme Mobile
HTML5 JS WIDGETS
DevExtreme Web
ENTERPRISE TOOLS
Report Server
Analytics Dashboard
iOS 7
DataExplorer
FRAMEWORKS
eXpressApp Framework
CODE-DEBUG-REFACTOR
CodeRush for Visual Studio
SUPPORT
Search the Knowledge Base
My Questions
Code Examples
Getting Started
Demos
Documentation
Blogs
Training
Webinars
Current Version/Build
Version History
FOLLOW US
If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383
https://www.devexpress.com/Support/Center/Question/Details/Q403538
2/2