Fixed in trunk few days ago.
2009/6/14 haggisandchips <[email protected]>
>
> This is my first post so Hi All ;)
>
> I am building a project with Visual C# Express 2008 and I am getting
> an exception ...
>
> "Column 'ReservedWord' does not belong to table ReservedWords"
>
> ... when building the session factory and I have identified that it is
> down to this block of NHibernate code (the full stack trace is
> below) ...
>
> var result = new HashedSet<string>();
> DataTable dtReservedWords = connection.GetSchema
> (DbMetaDataCollectionNames.ReservedWords);
> foreach (DataRow row in dtReservedWords.Rows)
> {
> result.Add(row["ReservedWord"].ToString()); <<<<<< Exception
> thrown here
> }
>
> I can avoid this bit of code being called by setting hbm2ddl.keywords
> to none but I'm still curious what the exception means.
>
> My best guess is that my Connector (MySql Connect 6.0) is reporting
> that it can handle schema metdata but the underlying database cannot
> (MySql 5.0) and this would concern me that there may be other
> inconsistencies that might bite me later.
>
> Does anyone else have an explanation?
>
> Many thanks
> Ivor
>
>
>
>
> Full Stack Trace ...
>
> at System.Data.DataRow.GetDataColumn(String columnName)
> at System.Data.DataRow.get_Item(String columnName)
> at NHibernate.Dialect.Schema.AbstractDataBaseSchema.GetReservedWords
> () in c:\CSharp\NH\nhibernate\src\NHibernate\Dialect\Schema
> \AbstractDataBaseSchema.cs:line 100
> at NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.GetReservedWords
> (Dialect dialect, IConnectionHelper connectionHelper) in c:\CSharp\NH
> \nhibernate\src\NHibernate\Tool\hbm2ddl\SchemaMetadataUpdater.cs:line
> 47
> at NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.Update
> (ISessionFactory sessionFactory) in c:\CSharp\NH\nhibernate\src
> \NHibernate\Tool\hbm2ddl\SchemaMetadataUpdater.cs:line 17
> at NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg,
> IMapping mapping, Settings settings, EventListeners listeners) in c:
> \CSharp\NH\nhibernate\src\NHibernate\Impl\SessionFactoryImpl.cs:line
> 169
> at NHibernate.Cfg.Configuration.BuildSessionFactory() in c:\CSharp
> \NH\nhibernate\src\NHibernate\Cfg\Configuration.cs:line 1090
> at FantasyFootball.Repositories.NHibernateHelper.get_SessionFactory
> () in E:\Development\VisualCS_Workspace\FantasyFootball\FantasyFootball
> \Repositories\NHibernateHelper.cs:line 18
> at FantasyFootball.Repositories.NHibernateHelper.OpenSession() in E:
> \Development\VisualCS_Workspace\FantasyFootball\FantasyFootball
> \Repositories\NHibernateHelper.cs:line 27
> at
> FantasyFootball.Repositories.PlayerRepository.GetPlayersByPosition
> (Position position) in E:\Development\VisualCS_Workspace
> \FantasyFootball\FantasyFootball\Repositories\PlayerRepository.cs:line
> 13
> at
> FantasyFootball.Tests.PlayerRepository_Fixture.Can_get_players_by_position
> () in E:\Development\VisualCS_Workspace\FantasyFootball
> \FantasyFootball.Tests\PlayerRepository_Fixture.cs:line 12
> at FantasyFootball.Tests.PlayerRepository_Fixture.Main() in E:
> \Development\VisualCS_Workspace\FantasyFootball\FantasyFootball.Tests
> \PlayerRepository_Fixture.cs:line 22
> at System.AppDomain._nExecuteAssembly(Assembly assembly, String[]
> args)
> at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
> assemblySecurity, String[] args)
> at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly
> ()
> at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
> at System.Threading.ExecutionContext.Run(ExecutionContext
> executionContext, ContextCallback callback, Object state)
> at System.Threading.ThreadHelper.ThreadStart()
>
> >
>
--
Fabio Maulo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---