Thanks. I'll have a propper look at it over the weekend and submit a
patch. I think there may be another inconsistency as there is a
GetQuotedSchemaName and GetQuotedSchema that both take a Dialect
attribute. I'll look through properly as I suspect one is redudant.

One other thing.
I hadn't looked much at this code base before. I noticed yesterday
that there are a load of "SupportsX..." type of properties on Dialect.
Should there be a SupportsSchema property?
I suppose from a purist point of view if this property is false for a
certain dialect, a NotSupportedException should be thrown, but I
wonder if it's worth having support for dealing with it diffrently
(e.g. ignore the schema attribute or throw an exception). That way it
would be possible, for example, to create a SqlCeDialect that ignores
schemas and thus still can be used for testing while the production
system uses schemas.

On Apr 16, 11:31 pm, Ayende Rahien <[email protected]> wrote:
> Yes, it is a bug, please send us a patch for this
>
> On Thu, Apr 16, 2009 at 6:07 PM, Dries Samyn 
> <[email protected]>wrote:
>
>
>
>
>
> > Hi,
>
> > I am using the latest 2.0 release and I think I discovered a bug in
> > the Mapping.Table class.
> > The class has the following method:
>
> > public string GetQuotedSchema(Dialect.Dialect dialect)
> >                {
> >                        return IsSchemaQuoted ? dialect.OpenQuote + schema +
> > dialect.CloseQuote : schema;
> >                }
> > I believe this should be:
>
> > public string GetQuotedSchema(Dialect.Dialect dialect)
> >                {
> >                        return IsSchemaQuoted ?
> > dialect.QuoteForSchemaName(schema) :
> > schema;
> >                }
>
> > The reason I found out about this is that I am using SqlCE as a db
> > engine for my unit tests while using SQL Server 2005 in production. We
> > want to use Schema to logically split different sections of the
> > database. As it turns out, SqlCe doesn't support schemas.
> > As we use SqlCe for unit testing only and the test generate the DB
> > each time, I am not too worried about it using the schemas, so as a
> > "hack" I wanted to generate a Dummy SqlCeDialect that basically
> > overrides "QuoteForSchemaName" and returns null instead of the actual
> > schema. While trying that out, I noticed this method doesn't get used.
>
> > Would you agree this is a bug? Shall I send a patch through?- Hide quoted 
> > text -
>
> - Show quoted text -

Reply via email to