×

Notice

The forum is in read only mode.
×
Getting new Releases

To get notified on new releases you may follow us on twitter @expandframework or subscribe in our main RSS feed.

Topic-icon ModelDifference ModelToUpdateFromFileCriteria -> Please make it optional

  • Johannes
  • Johannes's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
1 year 4 months ago #11293 by Johannes
Hi!

The functionality of ModelToUpdateFromFileCriteria setting in ModelDifference module is causing me a lot of troubles. F.e. I upgraded from 17.1. to 17.2 in development. When I connect to the database then ModelDifference module writes new Application settings model entry. When clients still on Version 17.1. then try to open the application they fail because of an incompatible model format.

As this is really a pain I currently have no workaround for, I suggest an option similar to the XAF setting DatabaseUpdateMode = DatabaseUpdateMode.Never where on can be sure that the Module doesn't create or change application model settings. I have tried to set ModelToUpdateFromFileCriteria empty but again the module generated a new application layer model (maybe on less circumstances) and clients were broken again.

Regards,
Johannes
More
1 year 4 months ago #11294 by Tolis
> When clients still on Version 17.1. then try to open the application they fail because of an incompatible model format.

What do you mean by this? how they try to open and what kind of incompatibility?

To get notified on new releases follow us on twitter @expandframework or subscribe RSS feed. I am also available @tolisss . Also see How to debug eXpand
More
1 year 4 months ago #11295 by Tolis
I want to help but your problem is not clear.


> I have tried to set ModelToUpdateFromFileCriteria empty but again the module generated a new application layer model (maybe on less circumstances) and clients were broken again.

this attribute if matched will only update the XmlContext of the related MDO object and does not generate new objects. If I am mistaken please post some details to demonstrate the case. To disable the XmlContent modification it is as easy as modifying the ModelToUpdateFromFileCriteria (at least on my local tests)

To get notified on new releases follow us on twitter @expandframework or subscribe RSS feed. I am also available @tolisss . Also see How to debug eXpand
  • Johannes
  • Johannes's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
1 year 4 months ago - 1 year 4 months ago #11296 by Johannes
The problem might not be caused by ModelToUpdateFromFileCriteria exactly then as a new application model setting gets created (although the original already exists. It's the newly generated application model setting that let clients still on 17.1 fail (with an "an element with the same key already exists" error). Probably it has something to do with changes regarding the new "DeviceCategory".

What's clear to me is that ModelDifference-Module creates a new application model regardless wheter ModelToUpdateFromFileCriteria is empty or not. It would be much better if there would be an option that make absolutely sure that ModelDifference doesn't create or change any application model setting (I have no problem if throws an exception than if something necessary is missing). The potential problems with always-autofiddling here seems numerous to me (and it's not first problem I encountered with it). Like the XAF database schema upgrade feature it can be very useful in many cases, but it might be harmful in other cases (f.e. in a production environment).

Here, by the way, is a stacktrace where the new application model setting is created ( although application model setting already exists in the database and ModelToUpdateFromFileCriteria is empty):
> Xpand.ExpressApp.ModelDifference.dll!Xpand.ExpressApp.ModelDifference.DictionaryStores.XpoModelDictionaryDifferenceStore.CreateNew(DevExpress.ExpressApp.Model.Core.ModelApplicationBase model, Xpand.Persistent.Base.ModelDifference.DeviceCategory deviceCategory) Line 114 C#
Xpand.ExpressApp.ModelDifference.dll!Xpand.ExpressApp.ModelDifference.DictionaryStores.XpoModelDictionaryDifferenceStore.GetObjectInfos(DevExpress.ExpressApp.Model.Core.ModelApplicationBase model, Xpand.Persistent.Base.ModelDifference.DeviceCategory deviceCategory) Line 110 C#
Xpand.ExpressApp.ModelDifference.dll!Xpand.ExpressApp.ModelDifference.DictionaryStores.XpoModelDictionaryDifferenceStore.Load(DevExpress.ExpressApp.Model.Core.ModelApplicationBase model) Line 42 C#
Xpand.ExpressApp.ModelDifference.dll!Xpand.ExpressApp.ModelDifference.ModelDifferenceBaseModule.LoadApplicationModels(DevExpress.ExpressApp.Model.Core.ModelApplicationBase model) Line 60 C#
Xpand.ExpressApp.ModelDifference.dll!Xpand.ExpressApp.ModelDifference.ModelDifferenceBaseModule.LoadModels() Line 41 C#
Xpand.ExpressApp.ModelDifference.dll!Xpand.ExpressApp.ModelDifference.ModelDifferenceBaseModule.OnUserDifferencesLoaded(object sender, System.EventArgs eventArgs) Line 37 C#
Last edit: 1 year 4 months ago by Johannes.
More
1 year 4 months ago #11297 by Tolis
can you also please post your log?

To get notified on new releases follow us on twitter @expandframework or subscribe RSS feed. I am also available @tolisss . Also see How to debug eXpand
  • Johannes
  • Johannes's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
1 year 4 months ago #11298 by Johannes
Thank you for your willingness to help, Tolis. Meanwhile I have found a solution to the current problem. I had to add the DeviceCategory after the upgrade. I now did set the value from Null to 0 for all entries and the additional application model setting no longer gets generated.

Apart from this particular case the suggestion for something like ApplicationModelUpdateMode = ApplicationModelUpdateMode.Never for mentioned reasons is prevailing.

Regards,
Johannes
The following user(s) said Thank You: Tolis
Moderators: expand
Time to create page: 0.351 seconds