The default entity persister creates an Insert string that
raises an exception when a table name is the same as a
SQL reserved word. For instance a table named "Order"
will cause a problem. Other table names that will cause a
problem are: asc, desc, where, by, from, group, values,
etc...
Issue can be corrected by enclosing table names and
column names in [].
Logged In: YES
user_id=511729
MySql does not use brackets to quote names. In its standard
mode, it uses the ` (backtick), in ANSI_MODE, it uses "
(doublequotes).
MySql calls bracketed names a syntax error.
How about we add a method called QuoteChar to the
ISpfDataStore and implement it as appropriate in the
DataStores. Then the Persisters can call the QuoteChar to
get the proper character for the datastore.
Scott
Logged In: YES
user_id=663309
The method should be string QuoteName(string dbObjectName)
because single character is not enougth.
For example for MS SQL Server you should have [TableName],
when for MySQL `TableName` or "TableName"