Hi,
I'm having some dificulties mapping the following two classes to
database tables by convention. I can't seem to get properties
PersonWorks and PersonBirths from class City to point to different
Persons. The database representation is listed below classes. If there
is any way to automap this or something similiral by convention, that
would be great, i have tried various ways (GetForeignKeyName,
GetForeignKeyNameOfParent...) but failed. I can freeley alter database
name convention if needed.
--------------------------
  public class Person
  {
  public virtual int IdPerson { get; set; }
  public virtual string PersonName { get; set; }
  public virtual City CityWork { get; set; }
  public virtual City CityBirth { get; set; }
  }
-------------------------
  public class City
  {
  public City()   {  Persons = new List<Person>();  PersonBirths = new
List<PersonWork>();  }
  public virtual int IdCity { get; set; }
  public virtual string CityName { get; set; }
  public virtual IList<Person> PersonWorks { get; set; }
  public virtual IList<Person> PersonBirths { get; set; }
  }
----------------------
Table Person:
----------------------
IdPerson,
PersonName,
IdCityWork,
IdCityBirt
----------------------
Table City:
----------------------
IdCity
CityName

Thanks in advance for any advice.
Regards, Miha

--~--~---------~--~----~------------~-------~--~----~
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