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
|
We have noticed problems with lightspeed being able to handle more than one entity pointing to the same table. so for example we want to do something like: EntityName: DogJump : IJumpable Column: JumpCount (int) TableName: Dog -------------------------------- EntityName: DogRoll : IRollable Column: RollCount (int) TableName: Dog ------------------------------------------ EntityName: CatJump : IJumpable Column: JumpCount (int) TableName: Cat -------------------------------- EntityName: CatRoll : IRollable Column: RollCount (int) TableName: Cat ------------------------------------------
So, we have two entities pointing to the same table, then we want to be able to have a multi-threaded service that takes queued messages that will increment the "Dog" table or "Cat" table with a roll or a jump by 1. When we try to implement this, we get messages like: ------------------------------------------------------------------------------------------------------ Entity not in simpleDB: DogJump : aab039d4-0102-4f03-929d-cd16fd85274e We have tried to call "data.SaveChanges(true)" as described in this post: http://www.mindscape.co.nz/forums/Thread.aspx?PostID=2865 But the error still occurs... Is doing something like this using Lightspeed in an improper manner? Thanks, -Joe
|
|
|
It's not improper, though care is required because you will end up with multiple entities representing the same database row, and it's up to you to avoid race conditions, change propagation, etc. (I don't think these issues will affect your particular scenario; I'm speaking generally here.) However, the SimpleDB adapter did contain an assumption that it could map from table name to entity type using the table name alone, and that of course failed when you had two entity types mapping to the same table name. I've committed a candidate fix for this which will be included in nightly builds dated 26 August and above, and should resolve your scenario. If you still see problems, please let us know. |
|
|
Ivan, You continue to amaze us with how fast you implement fixes and feature requests. Thanks a lot! -Joe Freeman
|
|