This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I recently tried to add a field called "FreeText" to the database (it best describes the field), creating the field in the entity worked just fine. Updating the database schema also worked just fine. However we got an error when trying to insert/update the records. SQL Server complained about FreeText being a keyword. A work around was to specify the column name as [FreeText], but I would guess that this should have been done by LightSpeed (instead of manually). Regards, Jerremy |
|
|
Hi Jerremy, You can enable identifier quoting on LightSpeedContext or config using QuoteIdentifiers. Example: <add name="SQLite" OR with code _context = new LightSpeedContext(); I hope that helps, John-Daniel Trask |
|
|
I love hidden options :) Why would the default be false for this? Not that it matters, its just that the exception doesnt hint towards the use of this configuration option. |
|
|
Hi Jerremy, Unfortunately it is a bit hidden I guess although we did document it :-) We have debated this setting a lot internally but the key reason it's off by default is consistency. On some databases you will find that quoting identifiers suddenly makes everything case sensitive in queries. By having it off by default, everyone is more or less the same. We wanted to avoid the situation which is fairly common - folks develop against a certain database and then deploy to another database engine and just change the config. Not ideal to be sure but an impact of trying to abstract all the different databases out there. I hope that helps, John-Daniel Trask |
|