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
|
Hello All, I am developing a MVC3 project which base on LightSpeed 4.0,VS2010,and SQL 2008 R2, there is a property(says TestReference) of an Entity class, get {} section of this property used to return a value by calling a method in UnitOfWork, I changed to use Entity.Get(EntityHolder) method to return value in the get{} section ,but I noticed an interesting issue since I changed it, once I send a complex muti-table(5 tables) Linq query to database,the method Entity.Get(EntityHolder) return null,but if I work upon debug mode, Entity.Get(EntityHolder) return the value I expected. it seems complex query delays returning result,I am not sure how method Entity.Get(EntityHolder) works, why this happen? Does anyone have idea? Any help will be great appreciate. C.F. |
|
|
I'm not sure why your TestReference property originally used a UnitOfWork lookup rather than being modelled as an association, because using an association is the default, and if someone changed it, there was probably a good reason. You should probably find this out before changing it back -- it may be that TestReference cannot be modelled as an association for example because the lookup is on a unique key rather than the primary key. It should not behave differently in debug and release builds, and I don't think it's to do with complex queries 'delaying' their results (they don't). Can you provide us with a simple, minimal repro (in the form of a console application or NUnit test)? Thanks! |
|
|
Hello Ivan, Thank you so much for your response,and sorry for replying late,since I was waiting for the developer's response for this issue,he mentioned this might be a bug in Lightspeed,and the debug mode I mentioned in previous post is that I debuged the method step by step in VS2010,not the compile options(Debug/Release),can I have your email address? so I can provide you more information to investigate this issue. Thanks again, Charles |
|
|
We prefer to use the forums for support in case another customer runs into the same issue. The best thing to do is to create a minimal repro as a console application or NUnit project, zip it up and attach it to a forum post (via the Upload a File button). You can anonymise the entities if they are sensitive (e.g. change names to bland things like Customer, Employee, Product, etc.). If it is impossible to reproduce the issue without revealing sensitive information, our support address is support@mindscape.co.nz. |
|
|
Hello Ivan, Eventually we found that this issue was caused by an incorrect cross join in a Linq statement, it was returning bad result,it works in debugging process because I used "Add watch" window to view the data,I guessed that might store the data into memory. Thank you so much for your help, Charles |
|