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
|
Hi guys, I have an issue where I am receiving a KeyNotFound exception when loading an entity that has a nullable association which is marked with the [EagerLoad] attribute. My association declaration looks something like: private Guid? _itemCategoryId;[EagerLoad] private EntityHolder<ItemCategory> _itemCategory = new EntityHolder<ItemCategory>(); When I load an entity that has a null itemCategory, I receive the KeyNotFound exception. Removing the EagerLoad attribute resolves the issue. Cheers, Greg |
|
|
Hi Greg, We have tried to create a simple repro based on your explanation here however we are unable to do so. Would you be able to provide a repro that we can run through and test with? Thanks, John-Daniel Trask |
|
|
Hi John-Daniel, In the process of creating the requested repro I have stumbled upon an issue in my code that looks to be the root cause of the KeyNotFound exception. For the record (and others' benefit), I had a rogue statement that was setting the itemCategoryId field to Guid.Empty instead of null. So, clock this one up as "User Error". Thanks for your time anyway, |
|
|
Not a problem Greg, it's often the case that as soon as you go to show somebody else you realise the mistake. I hope you're progressing well and enjoying LightSpeed. Thanks, John-Daniel |
|