Inherited managed properties bug?

Inherited managed properties bug?

Old forum URL: forums.lhotka.net/forums/t/5355.aspx


jureleskovec posted on Saturday, September 06, 2008

Many of my BOs derive from the base BO class BusinessBaseWithId<T>. As the name of the class implies, it has one managed property 'Id' of type 'int'. Let's say I have BO named 'Project' which extends the BusinessBaseWithId<T> and has one managed property named 'Name'.

When using local proxy everything is OK. FieldManager of the returned 'Project' object shows 2 PropertyInfo objects in the '_propertyList' collection (Name and Id).
But when switching to the WcfProxy there is only one item in the property list collection (Name), the Id property info is missing.

I know the problem with static fields that need to be initialized before using BO. I already have the following code in the base class:

private static int _dummy;
protected BusinessBaseWithId()
{
      _dummy = 0;
}

In fact I can't belive I ran on a bug that is so easy to find. I still belive I'm just missing something.


-- Jure

skagen00 replied on Saturday, September 06, 2008

Set the dummy flag within OnDeserialized as well.

 

jureleskovec replied on Tuesday, September 09, 2008

That did it, thanks man!

-- Jure

Copyright (c) Marimer LLC