Serialization of EntityFields2

Posts   
 
    
mikeg22
User
Posts: 411
Joined: 30-Jun-2005
# Posted on: 22-Aug-2005 23:22:03   

Why does EntityBase2 have a serialize/deserialize constructor when EntityFields2 does not? Does this have to do with EntityFields2 implementing IClonable? The reason I ask is that I am attempting to add a property to the EntityFields2 class, and want to make sure that the value (stored in a class member) gets serialized correctly when we start using remoting.

Thanks!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 23-Aug-2005 09:12:47   

EntityBase2 implements ISerializable because it has an event. As soon as a class has an event, you can't simply put [Serializable] on a class' definition, you have to implement ISerializable, which is the reason why EntityFields2 doesnt implement it. Adding a class member gets serialized into the class automatically in the case of EntityFields2.

Word of warning: keep track of what you change in the ORMSupportclasses. The upcoming 1.0.2005.1 upgrade has some things changed in several classes, and with every upgrade you have to make sure your changes are re-applied to the new sourcecode.

Frans Bouma | Lead developer LLBLGen Pro