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
|
I am just getting started with LightSpeed an dam migrating some code from EF. I am running into this error which I am not sure how to interpret and correct: Mindscape.LightSpeed.LightSpeedException: Indirect circular association detected. LightSpeed has aborted to avoid a stack overflow. The chain of entity types with mutually dependent foreign keys is as follows: Entities.Sale Entities.Image Entities.Product In this case, Sale, Seller and Member each have One to One association with Image and Product has One to Many association. I am using LS nightly build. Thanks, Bryan |
|
|
This error gets raised when LightSpeed reaches an entity it has already seen when traversing the graph indicating a circular reference. With 1-1 relationships you can often resolve this by moving the FK across to the other table. If you are able to send through your model I can have a bit of a dig into whats occuring here, Ive tried recreating the model from what you have described above but am not seeing any circular references raised.
|
|
|
Jeremy Thanks for the reply. I actually worked around this by changing my model a bit, which actually made more sense and had less joins. I think the issue was that Sale, Seller and Product all have two way relationships with each other as well as Image so this may have caused the circular references. Turns out that I didn't need to have them all reference Image and removing that seems to have solved it. Thanks, Bryan |
|
|
Thanks for the update Bryan and glad to hear its all sorted!
|
|