hi,
i'm having a strange problem related with the mapping using
inheritance since that i've updated to NHibernate 2.1 Alpha 1... I
use pure autogenerated mappings, and never needed any special
overriding. I just ported to the new sharp version. this inheritance
was working with the old conventions...
class Member{
... some properties ...
}
class Child : Member {
... some properties ...
public virtual Parent Parent{get; set;}
}
class Parent{
... some properties ...
public virtual IList<Child> Children { get; protected set; }
}
but now that I've migrated to the new class based conventions it is
not working ... If I comment the Parent property from the Child class
than it works ... I believe that this may be related to the new class
conventions I created, since there was one old convention that I could
not find ANYWHERE which is:
c.GetForeignKeyNameOfParent = type => type.Name + "Fk";
I do not know how to add this conventions to any of the convention
classes I created, and the nhibernate blogs can't seem to talk about
this convention...
any help would be much appreciated... I'm really anoyed with this,
mainly because I cannot even get a decent error message to understand
the problem. I know the error happens when the Member class is being
mapped and it maps the Member and Child with a joined-subclass...
why does this happen when I add that property... just FYI this is the
error message
Tests.ClubeOla.Data.NHibernateMaps.MappingIntegrationTests.CanConfirmDataba
seMatchesMappings:
FluentNHibernate.Cfg.FluentConfigurationException : An invalid or
incomplete configuration was used while creating a SessionFactory.
Check PotentialReasons collection, and InnerException for more
detail.
* Database was not configured through Database method.
----> FluentNHibernate.Cfg.FluentConfigurationException : An
invalid
or incomplete configuration was used while creating a SessionFactory.
Check PotentialReasons collection, and InnerException for more
detail.
* Database was not configured through Database method.
----> System.ApplicationException : Error while trying to build the
Mapping Document for 'nhibtest.Member'
----> NHibernate.MappingException : Could not compile the mapping
document: (XmlDocument)
----> System.IndexOutOfRangeException : Index was outside the
bounds
of the array.
TearDown : System.Reflection.TargetInvocationException : Exception
has
been thrown by the target of an invocation.
----> System.Collections.Generic.KeyNotFoundException : The given
key was not present in the dictionary.
thank you very much
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---