Thank you for the explanation.
> The bugfix fixed what was meant to fix. If it poses other problems, then
> we are here to fix them.
>
When you explicitly map a many-to-many, it shouldn't make it a simple
value. Now I see the problem: if (modelInspector.IsManyToMany(property)).
With only the information of the property, the model cannot tell whether it
is a many-to-many or not in case of a dictionary, because there is a key
and a value which could be different. I propose to split it into
IsManyToMany and IsManyToManyKey. At a first glance, it wouldn't require
too many changes. The MapKeyManyToManyCustomizer and ManyToManyCustomizer
are adding to ManyToManyRelations and both know what they are.
ManyToManyRelations does not seem to be used for anything else. I'm not
sure if I should try to implement this myself. But it looks more or less
simple and we actually depend on this.
By the way, before it gets forgotten, there is a typo in
SimpleModelInspector line 421, it should return ManyToOneRelations.
IEnumerable<MemberInfo>
IModelExplicitDeclarationsHolder.ManyToOneRelations
{
get { return declaredModel.ManyToManyRelations; }
}
> BTW, what isn't mapping by code capable to do?
>
We have an interface that is mapped as a base class. There is another
interface that derives from it, but it is not mapped. There is a class
implementing that interface. That one is mapped as joined subclass. There
are more subclasses, some are mapped, others are not. This allows having
only the necessary tables in the database while having an independent class
and interface hierarchy. Mapping by code tries to find base classes itself,
which fails in this case. I didn't try with 4.0, but I also didn't see that
"Extends" can be declared in the mapping.
--
---
You received this message because you are subscribed to the Google Groups
"nhibernate-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.