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! I'm getting "Circular associations are not supported by LightSpeed" error but is this normal that this errors is showing only once? After refreshing page error is gone and webapp is working ok. Thanks |
|
|
No, that doesn't sound normal. Either you have a circular association, in which case LightSpeed should consistently refuse to run, or you don't, in which case LightSpeed shouldn't be complaining! I suppose it is possible that there is a circular association somewhere in your entity model but that the Web application never hits it (so your first page is seeing the exception that LightSpeed raises while initialising itself, but after that LightSpeed thinks it is initialised and lets you proceed), but I am still a bit surprised that LightSpeed is able to proceed at all in this situation. Because LightSpeed failed to finish initialising itself, I would not be confident of correct behaviour, and even if it seems to be working now it could fail as your data model evolves. We should really be failing consistently in this scenario rather than allowing pages to run against a partially-initialised model, so please don't rely on this continuing to work in future versions of LightSpeed. Thanks for letting us know about this! |
|
|
Do you plan to add circular associactions functionality to LightSpeed? |
|
|
We have no current plans for this. I believe the limitation on circular associations is a fairly fundamental one. Because of foreign key constraints in the database, we need to insert parents before children, and delete children before parents. So we need to have an ordering of the entity types (tables). But it is not possible to establish a consistent parent-child ordering at the type level if there is a circular association. (I may have this wrong by the way; I'm not 100% familiar with this part of LightSpeed.) What's your use case? We might be able to come up with an alternative approach... |
|