I'm trying to do my first transformation using the Relations language.
I use mediniQVT, but my question is not related to the implementation.

My example is an extension of that Members2Persons transformation known
from the ATL tutorial. Now I have this relation:

top relation Members2Female {
checkonly domain fam member: families::Member {
-- How to set the husband? I can retrieve the corresponding source
-- Member with spouse(member), but how to resolve it to the target
-- Male?
husband = ???
};
enforce domain per female: persons::Female {};
when {
isFemale(member);
}
where {
Members2Person(member, female);
}
}

That relation successfully creates Femals for Members that can be
identified as such. But how do I set the husband reference of Female?

I have a query spouse(Member):Member, that given a Member returns the
Member that is its spouse. But how do I resolve the returned Member
into the Male that was created for it?