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 have found some deletion problems within LightSpeed. Some of them are fixed now after I sent you examples. Others are still open because I was not able to build a small example and send it in and I am not allowed to send our complete DB-Model. As we have to deliver our product soon, I need to be able to perform some Workarounds. The situation is as follows: I have a UnitOfWork and an open transaction. Therefore I cannot simply open a new connection and execute some SQL-Commands. I tried to use the Connection from your Transaction but it seems to be always null. Is there any way to execute SQL-Commands when only having a UoW and a transaction? I am currently using the nightly of LS4 from 27th Juli. I will also send you the SQLs that are produced by LS and are incorrect. Maybe you can figure something out based on this information. Regards, Dennis |
|
|
You can use IUnitOfWork.PrepareCommand to run your own SQL on the LightSpeed connection and enlisted in the current transaction if any: using (IDbCommand cmd = _unitOfWork.Context.DataProviderObjectFactory.CreateCommand()) { If you want the SQL to run in same transaction as a SaveChanges, then you must explicitly start a transaction before the SaveChanges (or use a TransactionScope if your database supports it): using (TransactionScope ts = new TransactionScope()) { // or uow.BeginTransaction() Hope this is enough to provide a workaround for you -- let us know if you run into problems. Thanks for the SQL error info -- we will see if this provides us with any more insight into the problems you've been seeing. |
|
|
Just to update you on the specific case you emailed us, we are progressing a fix on this and hope to have something for you soon -- however we still have a couple of issues to resolve so I'm afraid it won't be in tonight's nightly build. |
|
|
There will be a candidate fix in the next nightly build. |
|
|
I just did a short check with our model and the error changed. So I guess you fixed the bug in the model I sent you, but there are further ones. I will try to extend the example-model in this direction.
|
|
|
Hi,
I just had the time to extend my example model in a way that the new error occurs. I sent you the model via mail.
Regards,
Dennis
|
|
|
Hi Dennis, I'm afraid the model hasn't come through. Can you resend please? |
|
|
Sorry the mail got stuck at our side. It should be on the way now.
|
|
|
Hello Dennis, Thanks for the repro. We now have a fix for this which will be in the next nightly build. In order to fix this problem we've had to make some changes to the class table inheritance code which could have a knock-on effect. We've regression tested the changes against previous models that you've sent us, but we're aware that your real model is bigger and more complex than we've seen. So please do let us know if you see any regressions and we'll try to get them sorted for you as quickly as possible. |
|
|
Hi,
I can now execute my example but it still does not work with my real model. Hopefully I will have time tomorrow to extend the example even further.
Regards,
Dennis
|
|
|
I tested it a bit more deeply and can now confirm that one of the two cases works in my model. Therefore it is a step forward...
|
|
|
Hi, I have just sent you an updated version of the model. Two entities have been added. Regards, Dennis |
|
|
Hi Dennis, We have a fix for the repro case in the current nightly build. Again, please let us know if you still see problems in the real model. |
|
|
Hi, I have successfully tested the nighty with our sample and our real model. Thanks a lot Dennis |
|