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
|
Hallo, in my databse I have records (in table TbCUser) with Id equal 0. And it cannot be changed. Database structure and data are fixed because of historical reasons. I have problems with retreiving such records. Let's imagine we have entity Group and entity User. Every Group contains many Users. So we have relation 1:M between these two entities. And now I'm trying to show all Users belonging to appropriate group, so ..
And during debbuging I noticed that one record in collection TbCUserGroupMapsByGroup is == null. After investigation, I noticed that this record has Id == 0 in my db. How to handle with such problem? I found one related post http://www.mindscapehq.com/forums/thread/4882 but I must say I couldn't manage with proposed workaround. It is not clear for me. Besides it is post from 2011. And my company has bought LightSpeed this month, and I hope Mindscape has fixed this issue. Thanks in advance for you help, Aleksandra |
|
|
Do you have a corresponding entity with an Id of 0 on the foreign table?
|
|
|
Hallo Jeremy, yes, I'm sure - corresponding entity exists on the foreign table, with Id == 0 Aleksandra |
|
|
Hmm thats odd as this should work fine, in fact we have tests covering this scenario. Are there any other settings you have applied to the entity which might be relevant here (e.g. soft delete?) If nothing else stands out could you please send us through a repro project and test data which we can investigate this further for you here.
|
|