Hi Alex,
I am trying to create audit table as follows
_SessionFactory = Fluently.Configure()
.Database(OracleClientConfiguration.Oracle10
.ConnectionString(@"Data Source=ABCD; Persist Security
Info=True; User ID=welcome; Password=abcd;")
.ShowSql()
).Mappings(m =>
m.FluentMappings.AddFromAssemblyOf<CustomerMap>())
//.ExposeConfiguration(cfg => new
SchemaUpdate(cfg).Execute(false, true))
.ExposeConfiguration(cfg => new
SchemaExport(cfg).Create(true,true))
.ExposeConfiguration(ConfigureEnvers)
.BuildSessionFactory();
private static void ConfigureEnvers(NHibernate.Cfg.Configuration nhConf)
{
var enversConf = new
NHibernate.Envers.Configuration.Fluent.FluentConfiguration();
enversConf.Audit<Customer>();
nhConf.IntegrateWithEnvers(enversConf);
}
but when I try to add customer object; I am getting error- could not get
next sequence value[SQL: select rev_id_seq.nextval from dual]
Any help would be appreciated.
Thank you
Minal
On Wednesday, November 14, 2012 at 1:33:57 PM UTC-5, Alex Brown wrote:
>
> Suddenly, the envers tables (REVINFO etc...) are no longer being created...
>
> I setup NHibernate / envers like this:
>
> public static ISessionFactory
> CreateSessionFactory(FluentConfiguration dbConfiguration = null)
> {
> if (dbConfiguration == null)
> dbConfiguration = Database();
>
> return dbConfiguration
> .Mappings(m =>
> m.FluentMappings.AddFromAssemblyOf<LicenseClassMap>())
> .ExposeConfiguration(cfg => new
> SchemaUpdate(cfg).Execute(false, true))
> .ExposeConfiguration(SetupEnvers)
> .BuildSessionFactory();
> }
>
> private static void SetupEnvers(Configuration cfg)
> {
> var enversConf = new
> NHibernate.Envers.Configuration.Fluent.FluentConfiguration();
> enversConf.Audit<License>();
> enversConf.Audit<LicenseActiveFeature>();
>
> cfg.IntegrateWithEnvers(enversConf);
> }
>
> I can't tell what's changed to make it stop working...
> License and LicenseActiveFeature look like this:
>
> My unit tests fail on inserting an entry, because envers is looking for
> REVINFO.... which hasn't been created?!
>
--
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.
For more options, visit https://groups.google.com/d/optout.