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 having a strange problem. I have defined an Entity, called glossary which is linked to itself using a one to many nullable relationship (parent -> glossaries). There's something very strange happening. When I want to access the parent from the object it always returns null. On the other side I can access the parentId. The strange thing is that I remember it happening randomly in the past. Now I can reproduce it anytime also on different databases. Any clues of what this can be? Thanks. |
|
|
The only thing I can think of is if the parent association is eager load. We can't eager load associations to self because of the hierarchy problem, and it's possible we have a bug where we think we have loaded the association (because it was eager) and therefore don't lazy-load it when you access it, so it always stays at null. We're not aware of such a bug but we have seen (and fixed) a similar one in the past. Try updating to the latest nightly build and see if that solves the problem. Also, if you have eager load on the association, try turning it off. If the problem still persists, could you provide us with a small buildable project (NUnit test or console application, plus sample data or SQLite/SQLCE file) that demonstrates the problem please? Thanks! |
|
|
I removed eager loading and it seems to work fine now. I'll check the latest build if I continue to have problems. Thanks. |
|