I added the property you are talking about to some test I have using this
mapper from NH 3.2 from the latest NH 3.2 NuGet package.

It doesn't happen in it.

First, your code doesn't compile, because the field is bool and property is
string.
I tried calling .ToString inside the getter of the property once and
changing the type of the property to bool another time and changing the type
of the field to string a third time.

In all cases it used the casing of the property not the field.



*Mohamed Meligy
*Readify | Senior Developer

M:+61 451 835006 | W: readify.net
[image: Description: Description: Description: Description:
rss_16]<http://gurustop.net>
[image: Description: Description: Description: Description:
cid:[email protected]]
<http://www.linkedin.com/in/meligy>  [image:
Description: Description: Description: Description:
cid:[email protected]] <http://twitter.com/meligy>
 
<http://www.greatplacetowork.com.au/best/best-companies-australia.php><http://www.readify.net/AboutUs/NewsItem.aspx?id=10>



On Wed, Jun 1, 2011 at 9:28 AM, Michael Teper <[email protected]>wrote:

> Given the class below, I would expect the ConventionModelMapper to map
> the IsHungry property to "IsHungry" column in the database.
> Unfortunately, it opts for "_isHungry" instead. Personally, I think
> that's a bug, but I realize that not everyone will agree, so what I'd
> really like to know is where can I override this?
>
> public class Person
> {
>  private bool _isHungry;
>
>  public string IsHungry
>  {
>    get { return _isHungry; }
>  }
>
>  public Person()
>  {
>    _isHungry = true;
>  }
> }
>
> Thank you!!
> -Michael
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" 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/nhusers?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" 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/nhusers?hl=en.

Reply via email to