Hello All,
I am trying to serialize data out from NHibernate objects to a file. I am using GUID's for my keys. I am able to serialize out using Binary Serialization, but when I try to deserialize from the binary file all my GUID's are retained, but NHibernate tries to update on these objects instead of inserting them, I have to nullify all ID fields before I save to the database.
My question is
1) How do I retain my GUID's
2) I am trying to push my changes on to a client site after making edits to the data locally, this is why I am trying to serialize out the data to a file and push the file out to the customer which he can load with out too much trouble.
I am open for suggestions and I am wondering how does NHibernate handle such kind of situation, I didn't find any methods to serialize NHibernate objects to a file. I tried to use XMLSerialization but had trouble with generic collection objects.
I appreciate all your help.
Thank you.
|