views:

6

answers:

0

Given the following class:

class XMap : ClassMap<X>
{
    HasMany(x => x.ListOfY);
    HasManyToMany(x => x.ListOfZ);
}

I need a way to read these mappings. Is there a way to detect these? I need something like:

XMap map = new XMap();
var t = GetMappingType(map, "ListOfY"); // somehow returns many-to-one
var t = GetMappingType(map, "ListOfZ"); // somehow returns many-to-many