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, getting an SQL-Exception in MSSQL is as easy as this:
Regards, Dennis |
|
|
Hi Dennis, Thanks for the repro, we are currently still investigating this so I will post an update once we have made some further progress.
|
|
|
Hi, have you made any progress regarding this issue in the past month? Regards, Dennis |
|
|
Hi Dennis, Unfortunately Jeremy is out of the office at the moment but I've pinged him and hopefully he will be able to reply shortly. |
|
|
Hi Dennis, Sorry I have been away on paternity leave and am just back in the office today. Currently we have a pretty good understanding on the issue which is down to the way in which the entities get sorted for insertion, however this seems to be a unique case which breaks down for inheritance hierarchies and changing the nature of the insert order to resolve this would break all existing behaviors so I am still trying to look at why this ends up incorrectly ordering in this particular case as opposed to others before we can resolve this. At this stage though I dont have an ETA on any fix Im afraid. Jeremy |
|
|
Hi Dennis, An update on this - it appears this problem is dependent on how the type model graph is originally traversed (by default this will start from the first entity type you use in a program). I am still investigating if there is going to be a smarter way of working this after the fact but for now you can control the load order by simply instantiating an entity type outside of a UnitOfWork scope so that the type model graph starts from that entity type. So a workaround for the issue you are seeing would be to add a: var dummy = new CAT(); at the beginning of your program, which will cause a valid ordering for the later insert. Let us know how this works for you, I suspect it may throw up some new ordering issues however so that would be useful to know. In the meantime we are continuing to look at implementing a fix for this.
|
|
|
Hi Dennis, I have made some changes which may correct this issue and these will be available in the next nightly build for you to test. Currently they are off by default but you can enable them by setting a CompatibilityOption on the LightSpeedContext instance associated with your UnitOfWork. e.g. context.CompatibilityOptions |= LightSpeedCompatibilityOptions.EnableCandidateFixes; If you are able to review how the use of this alters the behavior in your actual system that would be much appreciated, this resolves the issue on the repro sample you sent through but I suspect you will have a much more varied set of actual cases in reality. Also if you notice any regressions after switching this on please let me know.
|
|
|
Hi, with the current nightly everything seems to work fine. We will have a look at sideeffects on our software and perform some intensive tests during the next days. Regards, Dennis |
|