History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: NH-1520
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Ayende Rahien
Reporter: James Thigpen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
NHibernate

SQLite Dialect does not properly escape names surrounded by backticks

Created: 10/Oct/08 04:35 PM   Updated: 10/Oct/08 04:45 PM
Component/s: DataProviders / Dialects
Affects Version/s: 2.0.1.GA
Fix Version/s: 2.1.0.Alpha1


 Description  « Hide
On trunk as of right now:

SQLiteDialect does not properly quote table names when the table does
not have an associated schema. I'm not super familiar with
NHibernate, so maybe that's by design, but the MsSQL2005Dialect
returns "[name]" when a similar test as below is run against it.

You can add and run the following test to
Nhibernate.Test.DialectTest.SQLiteDialectFixture to verify this:

        [Test]
        public void QuotedTableNameWithoutSchemaWithSqlLite()
        {
            Table tbl = new Table();
            tbl.Name = "`name`";

            Assert.AreEqual("\"name\"", tbl.GetQualifiedName(dialect));
        }

Result of test running on current trunk:

NUnit.Framework.AssertionException: Expected string length 6 but was
5. Strings differ at index 0.
  Expected: ""name""
  But was: "name""
  -----------^

Thanks.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Ayende Rahien - 10/Oct/08 04:43 PM
Fixed on trunk, thanks for finding out