[fluent-nhib] Re: Auto Map Discriminator - Wrong Column Name

2009-11-10 Thread Will Smith
I've come up with an acceptable work around. I added the following to the Setup of my AutoPersistenceModel: m.DiscriminatorColumn = t => t.Name + "Type"; So, now I have "ScheduleCriteriaType" for my column name. On Nov 10, 11:29 am, Will Smith w

[fluent-nhib] Auto Map Discriminator - Wrong Column Name

2009-11-10 Thread Will Smith
I have the following: public class ScheduleCriteriaMappingOverride : IAutoMappingOverride { public void Override( AutoMapping mapping ) { mapping.DiscriminateSubClassesOnColumn( "CriteriaType" ); } } But I am getting this in my hbm.xml I would have expected: It

[fluent-nhib] Re: Complex Auto Map of Interface Component with Inheritance

2009-11-04 Thread Will Smith
I suppose the drawback to this approach is that I have to introduce an Id property that wasn't previously in my model. Something I guess I will have to live with. On Nov 4, 11:06 am, Will Smith wrote: > My consumer class have a public proprerty of type IScheduleCriteria. > There a

[fluent-nhib] Re: Complex Auto Map of Interface Component with Inheritance

2009-11-04 Thread Will Smith
abase, this makes sense. > > On Wed, Nov 4, 2009 at 10:30 AM, Will Smith wrote: > > > I'd like to get this on the radar again.  Can anyone out there help > > me?  Can FNH handle this scenario for me, or do I need to resort to > > pure NH? > > > Please read th

[fluent-nhib] Re: Complex Auto Map of Interface Component with Inheritance

2009-11-04 Thread Will Smith
I'd like to get this on the radar again. Can anyone out there help me? Can FNH handle this scenario for me, or do I need to resort to pure NH? Please read the full thread for context. Thanks, Will --~--~-~--~~~---~--~~ You received this message because you are

[fluent-nhib] Re: Complex Auto Map of Interface Component with Inheritance

2009-09-16 Thread Will Smith
, Criteria_StartTime NUMBER(20,0) not null, Criteria_EffectiveEndDate TIMESTAMP(4), Criteria_RecurrenceDelay number, Criteria_DaysOfWeek number, --some sort of bitmask primary key (Id) ) On Sep 16, 1:27 pm, Will Smith wrote: > I have a situation that I haven't been able to

[fluent-nhib] Complex Auto Map of Interface Component with Inheritance

2009-09-16 Thread Will Smith
I have a situation that I haven't been able to resolve by searching... Let's say I have (simplified for posting purposes) JobSchedule { public virtual int Id {get;set;} /*many other properties */ public virtual IScheduleCriteria ScheduleCriteria {get;set;} } IScheduleCriteria { DateTime

[fluent-nhib] Re: Auto Mapping Override and UseCompositeId

2009-06-18 Thread Will Smith
I suppose the ideal here would be that UseCompositeId would automatically add the key fields to the ignore property list. Perhaps I will dig through the Fluent code to see how to accomplish that. --~--~-~--~~~---~--~~ You received this message because you are subsc

[fluent-nhib] Re: Auto Mapping Override and UseCompositeId

2009-06-18 Thread Will Smith
I kinda stumbled on the solution to my problem. However it's somewhat of a hack. I've confirmed that this code works for Create Read and Update: public void Override( AutoMap mapping ) { mapping.WithTable( "xCoreConfiguration" ); mapping.IgnoreProperty( c

[fluent-nhib] Auto Mapping Override and UseCompositeId

2009-06-18 Thread Will Smith
I've tried bebugging this for a while and haven't made much headway. I've also read a few other posts regarding UseCompositeId and the seem to boil down to "use a surrogate key", which is not really an option for me. Here is my override code: public class ConfigurationMappingOverride : IAuto

[fluent-nhib] no persister error for Enum

2009-05-27 Thread Will Smith
I am using revision 451 and need to map an Enum. I discovered that the AutoMapper does not do this by default. I've tried two approaches at mapping my enum. 1) Manually with: mapping.Map( m => m.MyEnumProperty ); 2) Automatically by changing AutoMapColumn.IsMappableToColumnType by includ

[fluent-nhib] IIdConvetion with reference to mapping override of table name?

2009-04-27 Thread Will Smith
First of all, this is not an urgent issue. It's certainly a "nice-to- have", not an issue at all. But, I would like some additional feedback on how others might be solving this "problem". Below is the original issue submission, followed by a comment on how I might accomplish what I am looking f