Access to the NHibernate = "field.camelcase-underscore" setting fails in version 3

I have a solution that was created with NHib 1.2, which we upgrade to NHib 3.0.

Our hbm file has the following property:

<property name="ContentId" column="ContentId" access="field.camelcase-underscore" />

The class does not have a ContentId property. This works fine in NHib 1.2, but now we get the following exception:

Could not compile the mapping document: XXXX.Core.Domain.Video.hbm.xml ---> NHibernate.MappingException: Problem trying to set property type by reflection ---> NHibernate.MappingException: class Core.Domain.Video, Core, Version=1.0.0.29283, Culture=neutral, PublicKeyToken=null not found while looking for property: ContentId ---> NHibernate.PropertyNotFoundException: Could not find the property 'ContentId', associated to the field '_contentId', in class 'Core.Domain.Video'.

Why does this stop working? Is it supported in NHib 3?

We have many such properties that can be added.

+5
source share
2 answers

NHibernate NH2.X NH3.X. NHibernate, , , _camelCase. ContentId, NHibernate , .:)

:

<property name="_contentId" column="ContentId" access="field" />

HQL Criteria, _contentId, ContentId. - ContentId.

+10

, :

http://groups.google.com/group/nhusers/browse_thread/thread/e078734a221c3c0c/ec8b873b385d4426?lnk=gst&q=field+camelcase+underscore#ec8b873b385d4426

, :

<property name="PositiveValue" access="field.camelcase-underscore" />

: "PositiveValue" (NH) ; , (NH) "camelcase-underscore".

, .

, , , nhibernate3 . .

+1

All Articles