Hi, The problem is with the Table which is referring to is different. I am able to find it using NHibernate.SQL Logs and corrected the issue.
Thanks for your help Koti On Mon, Feb 1, 2021 at 10:18 PM Oskar Berggren <[email protected]> wrote: > Hi, > > I feel like you kind of skipped over something there - you say you "tried > creating", even by manual action in GUI, and you get an exception from > runtime about invalid column name. But do you actually have the column in > the (correct) table in the (correct) database or not? In other words - is > the problem that for some reason neither of the two methods you tried > succeed in creating the column, or is the problem that querying the table > isn't working despite the column actually being present when you check with > the tools of the database server itself? > > On Monday, February 1, 2021 at 5:26:24 PM UTC+1 Koti wrote: > >> Hello Group, >> >> Could any one help/guide me on the below Issue. >> >> 1) I have tried creating the new column using Sql -> Table Design -> Add >> New Column >> 2) I have tried creating the new column using FluentMigrator (See the >> code below) >> >> *using FluentMigrator;* >> >> *namespace WebApp.Core.Migrations.Release7_21 * >> *{* >> * [Migration(202006082020, "AchConfiguration Migration")]* >> * public class AchConfigurationMigration : Migration * >> * {* >> * public override void Up() { * >> * >> Create.Column("UseTerms").OnTable("AchConfiguration").InSchema("config")* >> * .AsBoolean().NotNullable().WithDefaultValue(1);* >> * }* >> * public override void Down() {* >> * }* >> * }* >> *}* >> I have executed the application by Clean/Rebuild the Solution but every >> time I'm experiencing the below exception >> >> Exception Details: Message: could not execute batch command.[SQL: SQL not >> available] Inner Exception: {"Invalid column name 'UseTerms'."} Stack >> Trace: at >> NHibernate.Engine.ActionQueue.BeforeTransactionCompletionProcessQueue.BeforeTransactionCompletion() >> at NHibernate.Impl.SessionImpl.BeforeTransactionCompletion(ITransaction tx) >> at NHibernate.Transaction.AdoTransaction.Commit() at >> WebApp.Core.Data.NHibernateData.Repositories.NHibernateRepository`1.Update(TEntity >> entity) in >> D:\WebApp\Core\WebApp.Core.Data.NHibernateData\Repositories\NHibernateRepository.cs:line >> 55 at >> WebApp.Core.Logic.Configuration.GroupConfigurationLogic.SaveGroupConig[TEntity,TDto](Int32 >> groupId, IRepository`1 repository, TDto dto) in >> D:\WebApp\Core\WebApp.Core.Logic\Configuration\GroupConfigurationLogic.cs:line >> 63 at >> WebApp.Core.Logic.Configuration.ConfigurationService.SaveGroupConfiguration(GroupConfigurationDto >> groupConfiguration, Guid updatedBy) in >> D:\WebApp\Core\WebApp.Core.Logic\Configuration\ConfigurationService.cs:line >> 91 at >> WebApp.Core.Wcf.ConfigurationService.SaveGroupConfiguration(GroupConfigurationDto >> groupConfiguration, Guid updatedBy) in >> D:\WebApp\Core\WebApp.Core.Wcf\ConfigurationService.svc.cs:line 24 at >> SyncInvokeSaveGroupConfiguration(Object , Object[] , Object[] ) at >> System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, >> Object[] inputs, Object[]& outputs) at >> System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& >> rpc) >> >> I'm really looking for some help on this. >> >> Thanks In Advance >> Koti >> > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/nhusers/168501d6-d414-471b-975c-ba23004830f9n%40googlegroups.com > <https://groups.google.com/d/msgid/nhusers/168501d6-d414-471b-975c-ba23004830f9n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/nhusers/CALTgp%2Bx6qJjczgSnJnOZ5Ad9gN_gnWX585dJ%3DtjpGLinZJAmeA%40mail.gmail.com.
