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
|
I'm using LightSpeed v3.0.1005.12888 built on 1/23/2010 to access a PostgreSQL v.84 database. I've created a table with a mixed case name (e.g., DocumentStatus). When I add a new row and attempt to perform a call to the SaveChanges() method, I get the following error: "ERROR: 42P01: relation \"documentstatus\" does not exist" Within the exception I see that the following SQL is being executed: I beleive this not quoted code is generated by LightSpeed, am I correct? Is there a workaround to solve my problem? Thanks in advance for your assistance... Alan |
|
|
We don't quote identifiers by default. Set LightSpeedContext.QuoteIdentifiers = true to turn this on (you can do this in code or config). You may find you need to explicitly set the Table Name (designer) or apply TableAttribute (handwritten code) to ensure that the now-quoted table names in the generated SQL get the correct case -- by default the generated identifiers will still be mixed-case, and it looks like your PostgreSQL instance wants everything to be lower-case. (You can also use a naming strategy for this rather than setting it everywhere by hand: see LightSpeedContext.NamingStrategy and the INamingStrategy.GetTableName method for more info.) |
|