Test CanConfermDataBaseMatchMappings Failure

17 views
Skip to first unread message

RWBradley

unread,
Dec 1, 2012, 3:56:59 PM12/1/12
to sharp...@googlegroups.com
I have started a new project added the entities and ten the unit tests.  I get the following error from CanConfermDataBaseMatchMappings unit test:
NHibernate.Exceptions.GenericADOException : could not execute query
[ SELECT TOP (@p0)  this_.Id as Id0_0_, this_.PracticeName as Practice2_0_0_, this_.PracticeURL as Practice3_0_0_, this_.PracticeLogoImage as Practice4_0_0_, this_.PracticeType as Practice5_0_0_, this_.PracticeRole as Practice6_0_0_ FROM Practices this_ ]
[SQL: SELECT TOP (@p0)  this_.Id as Id0_0_, this_.PracticeName as Practice2_0_0_, this_.PracticeURL as Practice3_0_0_, this_.PracticeLogoImage as Practice4_0_0_, this_.PracticeType as Practice5_0_0_, this_.PracticeRole as Practice6_0_0_ FROM Practices this_]
  ----> System.Data.SqlClient.SqlException : Invalid object name 'Practices'.
 
CanGenerateDatabaseSchema passes unit test.
 

Billy McCafferty

unread,
Dec 4, 2012, 5:55:28 PM12/4/12
to sharp...@googlegroups.com
Hi Roy,

This means that the table "Practices" does not exist in your DB.  I.e., even though you're connecting successfully to the DB, it looks like it's missing that table.  You can either create it manually or use the SQL generated from CanGenerateDatabaseSchema to create the table(s), accordingly.

Billy
Reply all
Reply to author
Forward
0 new messages