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 Guys, I been having a few interesting issues, in that, in our development region we are adding new feilds to the database and then when we deploy to a staging area, where somtimes the columns do not exist and an error is thrown. Is there a way of saying to lightspeed: 'If the feild does not exist then just use a a null default' ? Thanks again for your help, You guys have been great. Josh |
|
|
Sorry, this isn't possible at the moment. You could mark the fields as transient to prevent LightSpeed trying to load or save them, but you'll then need to remove the transient setting and rebuild and redeploy when the columns do become available, so it's not really a very realistic solution I'm afraid. |
|
|
Hi Ivan, Is this in the pipeline for development? Josh
|
|
|
It's not currently planned. The problem is that when we issue a query to the database, we request the columns explicitly rather than doing a SELECT *. So by the time we find out a column doesn't exist, it's too late: the database has already failed the query with a "column X doesn't exist" exception. Similarly on the INSERT/UPDATE side. And this is normally what you want. If your entity definitions and database schema are out of sync, then you normally want to know about it rather than have us silently load null values -- and, perhaps worse, throw data away on save. I'm therefore reluctant to implement a technically difficult feature (probing the database at run time to determine which columns we can use in INSERT and UPDATE queries) whose only purpose is to disguise an inconsistency in the system configuration. I hear where you're coming from, and I understand that it may not always be possible to do a "big bang" upgrade, but I don't think this is the right solution for the problem you're experiencing. Always open to further discussion of course! |
|