Entity becomes NULL after setting

Posts   
 
    
Posts: 3
Joined: 29-Nov-2006
# Posted on: 30-Nov-2006 00:12:16   

using version 1.0.2005.1 adapter

Hi Guys, I have a problem I hope someone can shed some light on.

Say I have an Entity called ProductEntity which contains an Entity called StatusEntity and both are aware of each other through the relationship:

ProductEntity * <--> 1 StatusEntity

I find that when I set the ProductEntity.StatusEntity to a new value, then set it back to the old value, then set it back to another new value, ProductEntity.StatusEntity would become NULL. So for Example,

ProductEntity.StatusEntity = activeStatusEntity; // ProductEntity.StatusEntity == Active ProductEntity.StatusEntity = inactiveStatusEntity; // ProductEntity.StatusEntity == Inactive ProductEntity.StatusEntity = activeStatusEntity; // ProductEntity.StatusEntity == Active ProductEntity.StatusEntity = inactiveStatusEntity; // ProductEntity.StatusEntity == NULL

both activateStatusEntity and inactiveStatusEntity come from the same EntityCollection.

Is this by design? why does this happen and how can I get around it? Thanks.

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 30-Nov-2006 02:31:25   

Are you using .NET 1.1 or 2.0?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 30-Nov-2006 10:28:40   

Also, what's the buildnr of the designer you're using? You need the latest templates and code generated with these latest templates as there were some issues in earlier builds of 1.0.2005.1 which didn't properly sync everything correctly. The latest designer build of v1.0.2005.1 is July 6th

ProductEntity.StatusEntity = activeStatusEntity; // ProductEntity.StatusEntity == Active ProductEntity.StatusEntity = inactiveStatusEntity; // ProductEntity.StatusEntity == Inactive ProductEntity.StatusEntity = activeStatusEntity; // ProductEntity.StatusEntity == Active ProductEntity.StatusEntity = inactiveStatusEntity; // ProductEntity.StatusEntity == NULL

it is strange though... it should have been inactive.

Frans Bouma | Lead developer LLBLGen Pro
Posts: 3
Joined: 29-Nov-2006
# Posted on: 30-Nov-2006 20:35:04   

Hi,

I'm using .NET 1.1. The designer release date is March 31st, 2006. Do you think using the latest 1.0.2005.1 designer will fix the problem?

Posts: 3
Joined: 29-Nov-2006
# Posted on: 01-Dec-2006 02:38:36   

i regenerated the code using the latest release of 1.0.2005.1 but i am still having the same problem. can somebody help? thanks.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 01-Dec-2006 09:37:59   

Would you please post a complete code snippet?