-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Export and Importing data.
PostPosted: Thu Jul 31, 2008 10:05 am 
Newbie

Joined: Wed Jul 30, 2008 5:06 pm
Posts: 1
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.