I already answer your duplicate post of this on this Stackoverflow answer but I'll repeat for this audience as well:
Link: http://stackoverflow.com/a/11790028/670028 You just need to pass a type to the inherited base class. See comments in the entities: public class Product : Entity<Guid> { // The ProductId property is no longer needed as the // Id property on the base class will be of type Guid // and can serve as the Id //public virtual Guid ProductId { get; set; } public virtual string Name { get; set; } public virtual string Description { get; set; } public virtual Decimal UnitPrice { get; set; } } public class Customer : Entity<int> { // The CustomerID property is no longer needed as the // Id property on the base class will be of type int // and can serve as the Id // public virtual int CustomerID { get; set; } public virtual string FirstName { get; set; } public virtual string LastName { get; set; } public virtual int Age { get; set; } } Now in your NHibernate mapping files, just specify what the database column is for your Id properties. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/IzfUb-8VFaYJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
