Mapping a property to a field from another table in NHibernate

Posted by Khalil Dahab on Stack Overflow See other posts from Stack Overflow or by Khalil Dahab
Published on 2010-03-20T22:59:40Z Indexed on 2010/03/20 23:01 UTC
Read the original article Hit count: 318

consider the following class:

class Order {
    int OrderId {get; set;}
    int CustomerId {get; set;}
    string CustomerName {get; set;}
    //other fields go here
}

which is mapped to Orders table. Is it possible to map the property CustomerName to the Customers table through the foreign key relation?

© Stack Overflow or respective owner

Related posts about nhibernate

Related posts about hibernate-mapping