If my class derives from Entity how do I define the documentid needed for nhibernate search/lucene.net using attributes?
Is this the best way:
[DocumentId]
public virtual int Id
{
get { return base.Id; }
protected set { base.Id = value; }
}
Thanks.
Christian
If your class derives from a base Entity, you just put the attribute on the property of the base class :
You don't have to override it in derived classes.