[fluent-nhib] Re: IgnoreProperty (s) on Component ?

2009-07-23 Thread Charles
Issue 237 register at James' request. (genuine issue) On Jul 20, 3:08 pm, Charles wrote: > Hei - > > We are successfully defining measurement classes as components, with > nice namin (automapping). > > However, there are multiple properties on thecomponentclasses that I > would have ignored. >

[fluent-nhib] Re: IgnoreProperty from IAutoMappingOverride

2009-07-08 Thread Berryl Hesh
Turns out there is a decent reason IgnoreProperty isn't causing the EventDate to be excluded from the mapping; EventDate is the key to a map of Allocations that another entity in the domain holds; from what little I understand of the mechanics of NHib Dictionary mapping this is correct (hopefully

[fluent-nhib] Re: ignoreproperty

2009-03-17 Thread Jon Kruger
I didn't realize you could do it that way... awesome. On Tue, Mar 17, 2009 at 3:51 PM, gre...@slavec.net wrote: > > The modification to new conventions is trivial. Check > > http://wiki.fluentnhibernate.org/show/ConvertingToNewStyleConventions > > It then goes something like this: > > public cla

[fluent-nhib] Re: ignoreproperty

2009-03-17 Thread gre...@slavec.net
The modification to new conventions is trivial. Check http://wiki.fluentnhibernate.org/show/ConvertingToNewStyleConventions It then goes something like this: public class UnmappableAttributeConvention : AttributePropertyConvention { public override void Apply(UnmappableAttributeattribute,

[fluent-nhib] Re: ignoreproperty

2009-03-17 Thread Jon Kruger
That doesn't work with the new convention overhaul (the methods are all changed). I was able to do it like this: public class CustomClassConvention : IClassConvention { public bool Accept(IClassMap target) { return true; } public void Apply(IC

[fluent-nhib] Re: ignoreproperty

2009-03-16 Thread Blee
That worked brilliantly. Thank you. On Mar 16, 2:44 am, "gre...@slavec.net" wrote: > You can try this: > > ... > .WithConvention(convention => >                                 { > > convention.ForAttribute > (UnmappableAttribute.RemoveMapping); >                                 }) > > ... > >

[fluent-nhib] Re: ignoreproperty

2009-03-16 Thread gre...@slavec.net
You can try this: ... .WithConvention(convention => { convention.ForAttribute (UnmappableAttribute.RemoveMapping); }) ... public class UnmappableAttribute : Attribute { public static void RemoveMapping(UnmappableAttr

[fluent-nhib] Re: ignoreproperty

2009-03-14 Thread Blee
That is pretty much what I assumed. I appreciate the feedback. If I think of another solution to this issue, I'll let ya'll know. On Mar 14, 8:49 pm, James Gregory wrote: > Automapping is a different game entirely. The Accept method is used to > ignore properties when applying conventions. The

[fluent-nhib] Re: ignoreproperty

2009-03-14 Thread James Gregory
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 wrote:

[fluent-nhib] Re: ignoreproperty

2009-03-14 Thread Jon Kruger
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 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 >

[fluent-nhib] Re: ignoreproperty

2009-03-14 Thread James Gregory
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.

[fluent-nhib] Re: ignoreproperty

2009-03-14 Thread Blee
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 wrote: > I haven't tried what I'm about to propose, but I

[fluent-nhib] Re: ignoreproperty

2009-03-14 Thread Jon Kruger
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

[fluent-nhib] Re: ignoreproperty

2009-03-14 Thread Blee
I was hoping that I was simply missing how to do this. Ideally, what I would like to be able to ignore a property off of a base class instead of having to ignore that property on each child class. Unfortunately, at the moment, I get an invalid cast trying to AutoMap to AutoMap. Since we don't ge

[fluent-nhib] Re: ignoreproperty

2009-03-14 Thread Adam Dymitruk
What would you suggest? On Fri, Mar 13, 2009 at 10:44 PM, Blee wrote: > > I just recently started using Fluent NHibernate and have to say that > it is a fantastic help. Recently we ran into a small issue that I > can't seem to find an obvious way around. Obvious to me, I should > say. :) > > W