Background: On my current project we are using SchemaExport to create
and drop our schema for database dependent tests. We are running one
instance of SQL Server 2005 with two separate databases that make up
our domain model and we use the schema attribute to map entities to
the proper database. Both of these look to be problems in the
MsSql2000Dialect.

Issue 1: The MsSql2000Dialect uses a string of the following form to
drop a table:

"if exists (select * from dbo.sysobjects where id object_id(N'{0}')
and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table {0}"

The use of "dbo.sysobjects" instead of [defaultSchema].sysobjects
causes tables not to be dropped if the table is not in the initial
catalog. I have a fix for this that adds defaultSchema to
GetDropTableString. Should I create an issue in JIRA and submit a
patch?

Issue 2: My other issue relates to cross-database foreign keys. SQL
Server 2005 does not support them but SchemaExport tries to create
them anyways when creating the schema. Should the MsSql2000Dialect not
attempt to create a foreign key in this case? If not, I can create an
issue in JIRA for this to and hopefully work on it soon.

Thanks,
Brian

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to