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 there, I've started to evaluate Lightspeed and have a question regarding updates. My tests are done towards the northwind test database and the productst table. If I retrieve a product with Linq2Sql and update the productname, only that single column will be part of the update sent. Example: UPDATE [dbo].[Products] SET [ProductName] = @p9 WHERE ([ProductID] = @p0) If I do the same operation with lightspeed, the following update is generated: UPDATE Products SET Discontinued = True, ProductName = 'Chef Anton\'s Gumbo Mix BAI L2S BAI', QuantityPerUnit = '36 boxes', ReorderLevel = 0, UnitPrice = 21,3500, UnitsInStock = 0, UnitsOnOrder = 0 WHERE Products.ProductID = 5 Doesn't lightspeed support changetracking on individual properties ? Kind regards |
|
|
Hi Ghost, Thanks for your feedback. We do track changes at the field level internally and do have partial updates down as a potential feature to add with LightSpeed 3.0. The reason behind not adding this feature currently is for concurrency reasons. For example, if rows are unversioned and you changed one field and somebody else changes one other it becomes possible for data in the database to be in an invalid state (we like to think at the model level more than the database so you may have a validation rule that states only one of those fields may have a value but in reality the situation could occur that data is no longer valid when selecting the object from the database). We are considering options:
I hope that helps, John-Daniel Trask |
|
|
Hi John-Daniel, thanks for the reply. I do see your concern from a model perspective. But, as a consultant, I often have to make good with what I get. Database may already exist and the customer demands certain functionality. If I am to switch to a new database access "tool" I need it to support my needs, even if they are not "best practices" or "the preferred way". If I do choose to use a tool like lightspeed, the tool has to be able to adapt to my situations and work with me. I really like the way you have created lightspeed. The object model is clean and naming conventions seems logical to me. I find it easy to work with and that’s a huge advantage. All in all it’s a great product. I’m digressing (something I'm really good at ;). As for the partial update case I'll try to list some thoughts:
That was just some thoughts, hope they can help you in some way. Kind regards |
|
|
All that beeing said, Im an old dog set in a relational way of seeing things. Maybe I could have split up the table in logical entities / views in lightspeed and completel avoided the whole problem :) |
|