Hibernate version: 1.2.0.CR1
Mapped class excerpt:
private List<string> authorizedUsers = new List<string>();
public List<string> AuthorizedUsers
{
get { return authorizedUsers; }
set { authorizedUsers = value; }
}
Mapping document except:
<property name="AuthorizedUsers" length="65536"/>
Hi all,
I have a list of strings in a class that I'm persisting to the database using NHibernate. I'm wondering what the recommended way of doing this is? The way I have it setup now, as far as I know it's using binary serialization (presumably BinaryFormatter) to save it to a column in the database. It seems to work fine. The question I have isn't so much an NHibernate one, but, one about binary serialization in general. I'm wondering what will happen when I upgrade from .NET 2.0 to .NET 3.0. Is it going to throw a versioning exception when it tries to deserialize a List that was serialized using .NET 2.0 when I'm using .NET 3.0? In the past, I've avoided having lists of strings and instead created another class with a string field and and id.
|