0

Is there any tool which can create insert scripts from given a NHibernate mapped object that is loaded with data?

With Serialization, I will have to ignore certain properties which does not mapped to column value will be lots of work.

NHibernate.FluentMigrator seems to fine to generate schema without data.

Creation of DTO will be too much work.

Do we have any place i can put a hook so that i can get the SQL statement with values when nHibernate loads the object which can be made into an insert script later.

Edit1: I doubt that we may not be able to get the sql parameter values from interceptor hook.

Or is there any readymade tool available to produce DML statements from NHibernate object?

keyr
  • 990
  • 13
  • 27

1 Answers1

0

Do we have any place i can put a hook so that i can get the SQL statement with values

You could implement and attach your own interceptor (example) to get hands on sql generated by hibernate but I suspect that values would be hidden behind parameters.

Maybe generating SQL withoud execution can be of help here.

Community
  • 1
  • 1
Mixer
  • 359
  • 4
  • 16