[fluent-nhib] Re: Mapping inherited classes

2010-05-17 Thread Felipe Leusin
Shouldn't AA Map be a SubclassMap? On May 17, 11:34 am, "Mauro D." wrote: > public class AMap : ClassMap >     { >         public AMap() >         { >             Id(x => x.Id); > >             Map(x => x.Nome); >             Map(x => x.Descrizione); > >             DiscriminateSubClassesOnColumn

[fluent-nhib] Re: Mapping with HasOn x References

2010-05-06 Thread Felipe Leusin
Just asking... did you considered making DocumentConfiguration a component? On May 6, 2:54 pm, Felipe Oriani wrote: > Hi everyones, > > I need to make a mapping One by One, and I have some doubts. I have this > classes: > > public class DocumentType { >    public virtual int Id { get; set; } >  

[fluent-nhib] Re: table-per-class hierarchy

2010-05-01 Thread Felipe Leusin
I've struggled a lot lately with discriminators and Daniel's advice is the best. Do not use the discriminator mapped as a property. You can even break DRY but i'll save you a whole lot of problem with the mapping. On May 1, 11:02 am, Daniel Mirapalheta wrote: >   To be honest I have never tried

[fluent-nhib] Re: Automappings and table-per-class-hierarchy

2010-04-15 Thread Felipe Leusin
inatorSet = true; } } Now is off to figure out a way to make an Override for Subclass OR create a new Convention perhaps to set DiscriminatorValue for the subclasses. On Apr 15, 8:59 am, Felipe Leusin wrote: > Just a heads up, after some further digg

[fluent-nhib] Re: Automappings and table-per-class-hierarchy

2010-04-15 Thread Felipe Leusin
I posted a question here a few weeks ago looking for a way to see if > there was a convention I could use and how to use it but no responses > at all, and definitely not obviously documented. I do get the > inheritance behavior at least! Life in the open source lane ... > > Cheers

[fluent-nhib] Re: Automappings and table-per-class-hierarchy

2010-04-14 Thread Felipe Leusin
A follow-up: If u set the DiscriminatorColumn in the setup part of AutoMapper you can change the name of the column, ie: DiscriminatorColumn = type => (type == typeof(MyClass)) ? "IsHomeTeam" : "discriminator"; But I've been having no luck in determining a way to set DiscriminatorColumn type and

[fluent-nhib] Re: Automappings and table-per-class-hierarchy

2010-04-11 Thread Felipe Leusin
Same problem here... probably gonna simply disable AutoMapping for those classes. On Mar 22, 3:06 pm, kberridge wrote: > Last check, can anyone provide any direction for me on this? > > Thanks, > Kevin > > On Mar 9, 6:37 pm, kberridge wrote: > > > Hi, > > I'm looking for an example of how to use

[fluent-nhib] Re: Dictionary Mapping

2010-03-08 Thread Felipe Leusin
7;t quite follow. > > I answered a pretty similar question to yours on stack overflow not too long > ago. Its for a case using strings instead of enums but I think it should be > straightforward to modify.. > > http://stackoverflow.com/questions/2254176/how-to-map-idictionarystri

[fluent-nhib] Dictionary Mapping

2010-03-05 Thread Felipe Leusin
Hi, I've been studying Fluent NHibernate lately and it's superb. But there is one situation that I simply can't get it to properly map: I have a Team entity with a TeamType Enum. I have a Player entity with a IDictionary Teams list. This is so a player can have only one team per TeamType. I'm aw