-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FNH 1.3: Mapping to the ICompositeUserType broken #93
Comments
Any news? I must migrate to the NH mapping from code? |
I am getting this same exception while trying to map an ICompositeUserType - is this an issue with FNH or not? |
its still buggy. Columns.Clear() doesn't help Edit: Ok, first set the CustomType and than add the columns with an clear: |
Can someone provide full code sample on that? |
I'm getting it on a Component map with no user types. I'll have to see if I can isolate it down. |
Ok, When I use a component map like
Where and I'm applying this Component convention.
I get the issue. |
Yesterday I grab last available sources of FNH to make it possible to use it with NH 3.2.0.4GA. But after update to new version (1.3) I start getting the following error:
FluentNHibernate.Cfg.FluentConfigurationException: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.
---> NHibernate.MappingException: property mapping has wrong number of columns: CashDepartment.Server.DomainModel.Enities.Service.Rate type: component[RateType,PaymentCondition,FixedAmountData,FixedCostOfArivalData,PercentageData]
at NHibernate.Mapping.PersistentClass.Validate(IMapping mapping) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Mapping\PersistentClass.cs:line 954
at NHibernate.Mapping.RootClass.Validate(IMapping mapping) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Mapping\RootClass.cs:line 371
at NHibernate.Cfg.Configuration.ValidateEntities() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Cfg\Configuration.cs:line 1030
at NHibernate.Cfg.Configuration.Validate() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Cfg\Configuration.cs:line 958
at NHibernate.Cfg.Configuration.BuildSessionFactory() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Cfg\Configuration.cs:line 1250
at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory()
--- End of inner exception stack trace ---
at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory()
This happens then I map ICompositeUserType:
C# Map(m => m.Amount).CustomType<MoneyCompositeType>();
After call CustomType method, returned PropertyPart object contains correct number of columns, but then FNH visitor visit this property during NH mapping generation it Columns collection contains only one column named as Property.
May be this information will be useful: this property located in class that mapped as Component.
I think this is the bug. How can I fix it?
The text was updated successfully, but these errors were encountered: