There's not any special capability to do this in NH (beyond the obvious of "you can query everything, persist it to disk, then insert it all over again").
You probably need to distinguish your own needs here betw "backup" and "data import-export". NH will never be a replacement for a 'backup' but you *could* use it for bulk import-export tasks. But the scope of what you'd get would meet only the very simplest of needs anyway since you'd not be "backing up" anything other than the contents of tables (i.e., no sprocs or anything else other than just the data itself). You *might* be able to twist NH into doing a comprehensive import-export (obviously the scope of the import-export would be limited to what you bothered to map in xml or otherwise) but you'll never get NH to do the work that the database's own intrinsic 'backup' system offers. Even if you get NH to do mass import-export, and even if you use techniques like stateless sessions, etc. I'd suggest that this probably isn't a good use-case for NH. Just my 2-cents. -Steve B. On Thursday, September 6, 2012 8:43:10 AM UTC-4, EmptyNull wrote: > > That is what I'm currently using. > > mysqldump.exe to get a dump of the database and mysql.exe to restore the > dump. > But that only works on mysql databases. > > My boss wants that the code works for any databases hooked to nhibernate. > Ie not only mysql but also mssql/etc > > On Thursday, September 6, 2012 2:38:11 PM UTC+2, Ramon Smits wrote: >> >> >> You are referring to a generic way to export/import a complete data set I >> think. For example, doing an export of your app running against mysql and >> importing that data into an instance running agains mssql. >> >> Correct? >> > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/YFMp75MuUFcJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
