I have some mapping files that specify a schema in the hibernate-mapping element. I mainly do this because I have to do a cross database join in the production environment.
I am currently trying to configure SQL Ce for my unit tests. Everything seems to be working fine except for a problem with the schema attribute in the mapping files. If I remove the schema attribute everything works perfectly fine.
Im getting this exception from the SchemaExport class:
Code:
NHibernate.HibernateException: The table name is not valid. [ Token line number (if known) = 1,Token line offset (if known) = 23,Table name = dbo ] ---> System.Data.SqlServerCe.SqlCeException: The table name is not valid. [ Token line number (if known) = 1,Token line offset (if known) = 23,Table name = dbo ].
Here are the messages from the log file:
Code:
- create table Customer.dbo.Queue (intQueueID INT IDENTITY NOT NULL,
intQueueStatusId INT not null,
intProductId INT not null,
intAccountId INT null,
primary key (intQueueID)
)
- Unsuccessful: create table Customer.dbo.Queue (intQueueID INT IDENTITY NOT NULL, intQueueStatusId INT not null, intProductId INT not null, intAccountId INT null, primary key (intQueueID))
Since SQL CE doesnt support the the schema prefix, is there anyway we can just ignore it for the MsSqlCeDialect? Or is ignoring the schema much more complicated than modifying the dialect?
Thanks.