Open selo-ecube opened 6 years ago
@selo-ecube I just re-read the last line and realized that you may have needed some action to fix this for your project. Sorry! I understood the issues as just feedback to fix in next releases (which we are working on at the moment). Do you still need help with that? Regarding the topic itself, we are getting rid of ViewModels, specially in Session, so we are working in the right direction.
Sorry for the late reply. Yes, we need help with that, but it's ok to wait until you fixed it. Thanks for getting back!
Unfortunately we are working on that in the 1.0.0-RC1 version which is completely different from the v0.x.x, so I don't think we could painlessly provide a fix for the latter version. But these are the key changes involved:
In your case you told me in another issue that you didn't want to go the cache solution, but it's the only solution that will solve this I'm afraid. So for your version I can either point you to the v1.0.0-RC1 development branch files so that you can copy them to your project and drop the Session classes from v0.x.x, or we can discuss which would be the best way for me to integrate them in v0.x.x so that it can help your case.
ViewModel
s are serialized to the session and then deserialized, the data fromViewModel.extendedViewModel
is lost.ViewModel.extendedViewModel
works fine in Handlebars, losing this information during session handling was unexpected to me.MiniCartBean
. Not using the extended view model but introducing a subclass ofMiniCartBean
is undoable because681
MiniCartBeanFactory.create(Cart)
not delegating to a separately overridable method that creates a Bean instance and at the same time being invoked viasuper.create(...)
fromTruncatedMiniCartBeanFactory
so our subclass ofTruncatedMiniCartBeanFactory
cannot overrideMiniCartBeanFactory.create(Cart)
in an effective way. Of course we could start copying more ofTruncatedMiniCartBeanFactory
but code copying has limits, right?