I have a problem I'm already trying to solve for some time.
The scenario is as follows
The person will make an insertion of a new entity in the database.
To begin insertion is necessary that I make a costly transformation from an xml file to fill some basic properties.
I wanted to process this xml before and store the object already transformed as o object in some short of cache.
After that, the process of filling the other properties of this object is very time consuming and I want the person could stop in the middle and back to end it after. however I can not save this object in the database incomplete, due to some validations that are made in the database when this object is inserted.
The solution I had tidied involved serialize the object when the person stop filling it, even if it is not done yet,than when the person come back to continue filling i would deserialize the object so the person could continue.
The problem is that when i try to serialize this object nihibernate serialize almost the entire database because of the lazy load and i get stackoverlow error ( lol it is funny to say this error here lol ).
Does anyone have any idea what I should do?
One of the things I had done was to keep the object in the cache (don't know how the /net 4 cache serialized it but seams to work) however everytime I retrieve the object it loses half of children objects, and always exactly half the children ....
if is live I have a order with 20 items if i try to get it back from the cache it will come back with 10 items if i try to retrieve it again I would got the order with only 5 itens.
Does anyone have any idea how to solve this?
already tries there