I don't know Fluent NH much but... Where do you generate the DDL?
________________________________
Från: [email protected] [[email protected]] för Sukumar K
[[email protected]]
Skickat: den 25 mars 2013 19:12
Till: [email protected]
Ä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].
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.
--
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.