Automapping is a different game entirely. The Accept method is used to
ignore properties when applying conventions. The automapper has an explicit
IgnoreProperty that's used to actually not map the property at all, which is
completely different.

On Sun, Mar 15, 2009 at 1:27 AM, Jon Kruger <krugs...@gmail.com> wrote:

> What's the purpose of the Accept() method then if it's not to ignore
> certain properties?
>
>
> On Sat, Mar 14, 2009 at 7:00 PM, James Gregory <jagregory....@gmail.com>wrote:
>
>> Although the idea is sound, it unfortunately won't work as there's no way
>> to ignore properties through conventions. Definitely something we need to
>> implement.
>> Unfortunately there's no workaround either. I've tried hacking something
>> together, but I've wasted half an hour already with no luck. Sorry.
>>
>>
>> On Sat, Mar 14, 2009 at 10:11 PM, Blee <le...@abl-consulting.com> wrote:
>>
>>>
>>> Using a property convention, I am able to apply a particular property
>>> convention to that property (rename tables, fields, etc) but I don't
>>> see a way to ignore it.  If there is, this approach would be ideal.
>>>
>>> On Mar 14, 3:26 pm, Jon Kruger <krugs...@gmail.com> wrote:
>>> > I haven't tried what I'm about to propose, but I think it would work.
>>> >
>>> > 1) Create an attribute that you will put on the properties that you
>>> > want to ignore (for example, an [Ignore] attribute)
>>> > 2) Override the IPropertyConvention (see here:
>>> http://wiki.fluentnhibernate.org/show/Conventions).  In the Accept()
>>> > method, check the property to see if it has the [Ignore] attribute,
>>> > and if it does, return false, otherwise return true.
>>> >
>>> > Hope this works!
>>> >
>>> > Jon
>>> >
>>>
>>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibernate@googlegroups.com
To unsubscribe from this group, send email to 
fluent-nhibernate+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to