Where and how are you creating your database schema? Are you using NH's 
SchemaExport?

From: [email protected] [mailto:[email protected]] On Behalf Of 
Sukumar K
Sent: den 26 mars 2013 07:15
To: [email protected]
Subject: Re: [nhusers] Invalid object name 'REVINFO'. Envers

I am new to NH too.
And novice with Envers on NH, i am trying to make this work 
http://envers.bitbucket.org/
But i guess something wrong there.

On Tuesday, March 26, 2013 3:24:23 AM UTC+5:30, Roger wrote:
I don't know Fluent NH much but... Where do you generate the DDL?

________________________________
Från: [email protected]<javascript:> 
[[email protected]<javascript:>] för Sukumar K 
[[email protected]<javascript:>]
Skickat: den 25 mars 2013 19:12
Till: [email protected]<javascript:>
Ämne: [nhusers] Invalid object name 'REVINFO'. Envers

My nHibernate Enverse configuration doesn't create the Audit tables.. Am i 
missing anything ???

When i try to save something it throws the exception


] ERROR (NHibernate.AdoNet.AbstractBatcher                           
)(:lambda_method:0) Could not execute query: INSERT INTO REVINFO (REVTSTMP) 
VALUES (@p0); select SCOPE_IDENTITY()

System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'REVINFO'.


below is the code what i have, with Attributes set for the entities which i 
want to audit.

cfg = Fluently.Configure()

                        .Database(pConfigurer)

                        .Mappings(m =>

                                      {

                                          
m.HbmMappings.AddFromAssemblyOf<NHibernateUtility>();

                                          
m.FluentMappings.AddFromAssemblyOf<NHibernateUtility>();

                                      })

                        .ExposeConfiguration(c =>

                        {

                            c.SetProperty("command_timeout", "5000");

                            c.EventListeners.PreUpdateEventListeners = new 
NHibernate.Event.IPreUpdateEventListener[] { new PreUpdateInsertEventListener() 
};

                            c.EventListeners.PreInsertEventListeners = new 
NHibernate.Event.IPreInsertEventListener[] { new PreUpdateInsertEventListener() 
};

                        })

                        .Cache(c => { c.UseQueryCache(); })

                        .BuildConfiguration();

                cfg.IntegrateWithEnvers(new AttributeConfiguration());



                if (cacheConfiguration)

                    SaveConfigurationToFile(cfg);


            }


            sessionFactory = cfg.BuildSessionFactory();

Thanks for the Help.


--
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected]<javascript:>.
To post to this group, send email to [email protected]<javascript:>.
Visit this group at http://groups.google.com/group/nhusers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To post to this group, send email to 
[email protected]<mailto:[email protected]>.
Visit this group at http://groups.google.com/group/nhusers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to