Essentially the title of this question explains the essense of what I
am trying to do, but to create a contrived example...

I have a class, call it Employee. Employee has an IPaymentBehaviour...

public class Employee
{
  IPaymentBehaviour _paymentBehaviour;

  protected internal Employee() { /* required by NH */}

  public Employee(IPaymentBehaviour paymentBehaviour)
  {
    _paymentBehaviour = paymentBehaviour;
  }

}

This corresponds to a database table like so:

dbo.Employees
-> EmployeeId (primary key)
-> PaymentBehaviourId (foreign key to lookup table)
-> Field1
-> Field2
-> Field3
-> Field4

Depending on the value of PaymentBehaviourId I need to 'inject' a
different implementation of IPaymentBehaviour into the Employee
object. Depending on which PaymentBehaviour was in use, Field1, 2, 3
or 4 might be needed to create that behaviour (those are the actual
column names).

Can anyone tell me how this would be mapped using Fluent-NHibernate?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
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/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to