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
|
It looks like Lightspeed5 doesn't update lists in many-to-many relations. I found this problem in a bigger application, but I managed to reproduce it for a similar situation in unit tests. Please download the attached test suite and look into the test "DeletingObjectInManyToManyrelationdeletesthrough_entities". When reading of the lists is disabled (aWithReadingListCountBeforeDelete is false), then test fails. IMHO it should pass regardless I read or don't read EntAList.Count. Probably this bug was introduced in nightly of 20130712 or a few nightly builds before. Dariusz Wąsacz, InstalSoft |
|
|
Thanks for reporting this and for the repro code. Ive reproduced the issue here and we are looking into what we can do to address this. The underlying issue here is that ThroughAssociations are not fully initialized until they are accessed via the collection property which leads to this issue. In the test case you can work around this by going the other way round when adding the entity (see code example below) however obviously in practice this may not be possible.
|
|
|
Thank you for looking into this bug. :-) Unfortunately in the "real" code I cannot use the workaround, because I cannot predict which way is the "correct" one. We treat many-to-many relations as symmetrical (no matter which object is 'source' and which is 'dest'). I hope you'll quickly find the solution. Darek Wąsacz, InstalSoft |
|
|
I'd like to ask if there's any news in this subject. Darek Wąsacz, InstalSoft |
|
|
Nothing new to report here, I am still working on trying to get a fix for this.
|
|
|
I'd like to confirm that the subject is very important for us! We cannot rely on the mentioned lists right now. As I mentioned before the bug has been introduced recently. |
|
|
I kindly ask you to take a look at this subject. Time passes and we cannot go forward with it :-( |
|
|
Sorry I cant report anything more positive at this stage. We are definitely still trying to come up with a resolution for this but unfortunately its not a trivial fix and we have not made any real positive headway on this yet despite a few different refactors to try and incorporate a solution sans regressions. So Im afraid for the time being I cant really offer much in terms of when this might be resolved so if you have any workaround you are currently using I would stick with that as your approach for now.
|
|