-->
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.  [ 4 posts ] 
Author Message
 Post subject: Saving/reading data to a file (xml, or any format)
PostPosted: Wed Aug 15, 2007 8:52 am 
Newbie

Joined: Mon Aug 13, 2007 11:51 am
Posts: 10
Hello,

I'm testing NHibernate to see if it will fit our needs.

I've seen that NHibernate could map to a large variety of DBs but not found any file adpater (like xml).

Could someone point me on any information or is that simply impossible ?

I need that to make a persistent snapshot of the datas and haven't any database for that. The other advantage, I can create a lot of snapshots creating files.

I've seen that a session is serializable, but I haven't found how to do it.

Thanks for any help.
Bye,
Didier


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 15, 2007 10:15 am 
Hibernate Team
Hibernate Team

Joined: Tue Jun 13, 2006 11:29 pm
Posts: 315
Location: Calgary, Alberta, Canada
NHibernate as distributed is only meant to work with DBMS. Mapping to XML, CSV, etc. is not in the feature set of NHibernate. Having said that, theoretically, anything that has an ADO.NET driver could be used with NHibernate. One may have to extend NHibernate and write his/her own Dialect for the underlying querying language.

_________________
Karl Chu


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 15, 2007 11:07 am 
Newbie

Joined: Mon Aug 13, 2007 11:51 am
Posts: 10
Thanks for your answer.

Anyway to serailize the cache ? (all objects)

I don't need to query the file, only to reload it as is.

Thanks
Didier


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 16, 2007 7:01 pm 
Hibernate Team
Hibernate Team

Joined: Tue Jun 13, 2006 11:29 pm
Posts: 315
Location: Calgary, Alberta, Canada
Hi Didier, NHibernate cannot use XML files as a persistence medium. What you are asking, in other words, is "can I serialize an object graph to an XML file?" Yes, but not with NHibernate; that is not the functional intent of NHibernate.

Google "XML object graph serialization", you will probably find what you need.

_________________
Karl Chu


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

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.