You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just to be sure:
A criteria object is inteded to be instantiated with new and not through a dataporal, correct?
If yes, the FieldManager needs an ApplicationContext in it's constructor. But because the criteria isn't instantiated through a data portal it has none.
My current way around that is a new bool to indicate whether the current object type (e.g. Criteria) has the need of a fully functional ApplicationContext or not. Depending on that I've introduced a new DummyApplicationContext with a private constructor which is just there to satisfy the need of an ApplicationContext. But the instance itself is not capable of doing any work because it's not correctly instantiated.
That's hell of an ugly workaround but I currently do not see any other way without breaking all criteria users.
Tbh I'm inclined with the new way serialization works to make criterias obsolete and promote POCO types as criterias. Less code on our side and our users side and no dependencies on any framework stuff because it's a POCO.
What do you think about marking CriteriaBase<T> as obsolete (maybe in v9 already?). And we drop it in v11 or later so people have enough time to migrate to the new POCO serialization?
* #3785 Update samples for rc4
* #3785 Update samples for rc4
* #3785 Update samples for rc4
* #3785 Update samples for rc4
* #4462 Mark CriteriaBase as obsolete
* #4462 Enhance docs around CriteriaBase and serialization of types
---------
Co-authored-by: Stefan Ossendorf <StefanOssendorf@users.noreply.github.com>
Originally posted by @StefanOssendorf in #1233
The text was updated successfully, but these errors were encountered: