Hi
I'm with a doubt!
I am having difficulty to mapping a relation like this
class Person {int id, string name, IList <PeopleTelephone>
PeopleTelephones}
class Phone {Id, Number}
class PeopleTelephone{People, Telephone}
Notice that the relationship between person and telephone
(PeopleTelephone) results on the IList type PeopleTelephone. But I do
not want that!
Bag (x => x.PeopleTelephones , map => map.Key (km => km.Column
("IdPeople")), map => map.OneToMany ());
I want him to be of type Phone.
class Person {int id, string name, IList <Phone> Phones}
I managed to do this with linq
public IList <Phone> Phones
{
get { return this.PeopleTelephones.Select(x => c.Phone).ToList(); }
}
but how the Phone property is not in the NH mapping, I can not use
this to make queries.
--
You received this message because you are subscribed to the Google Groups
"nhusers" 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/nhusers?hl=en.