There is some data access and entity classes and all of them have to base types. Entity classes are inherited from the following class:
Code:
public class PersistentObject<TId> : IPersistentObject<TId> where TId : struct
{
[DataMember]
public virtual TId Id { get; set; }
...
The class which mapping I'm working on it the following one:
Code:
public class WatchList: PersistentObject
{
[DataMember]
public virtual string Name { get; set; }
[DataMember]
public virtual User UserId { get; set; }
[DataMember]
public virtual WatchSecurity WatchSecurity{ get; set; }
}
The error is something with this property Id which mapping is the following:
Code:
<class name="WatchList" lazy="true" table="[WatchList]">
<id name="Id" type="int" unsaved-value="0">
<column name="Id" sql-type="int" not-null="true" unique="true" />
<generator class="identity" />
</id>
Table&column names are correct and the exception details have no particular information about the problem with mapping, just a fraze that the problem is with mapping. I've tryed exclude this property and after it the exception dispears. But the property is required. Tell me please what errors can be with Id property mappping.