Note that there are some explanatory texts on larger screens.

plurals
  1. POSerializing Nhibernate entities to json serialize too much
    primarykey
    data
    text
    <p>I have a problem I'm already trying to solve for some time.</p> <p>The scenario is as follows</p> <p>The person will make an insertion of a new entity in the database.</p> <p>To begin insertion is necessary that I make a costly transformation from an xml file to fill some basic properties.</p> <p>I wanted to process this xml before and store the object already transformed as o object in some short of cache.</p> <p>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.</p> <p>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. </p> <p>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 ).</p> <p>Does anyone have any idea what I should do?</p> <p>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 ....</p> <p>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. </p> <p>Does anyone have any idea how to solve this?</p> <p>already tries there </p> <p><a href="https://stackoverflow.com/questions/5593814/nhibernate-serializing-lazy-loaded-entities-with-wcf">NHibernate serializing lazy-loaded entities with WCF</a></p> <p><a href="https://stackoverflow.com/questions/4206925/serialize-nhibernate-query-to-json">Serialize nHibernate query to JSON</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload