[fluent-nhib] Re: How do I map an entity with a prop erty who’s type is an interface?

2009-05-12 Thread Paul Batum
I believe that union-subclass isn't supported by fluent nhibernate yet. You may have to consider mapping this particular set of entities using xml. On Wed, May 13, 2009 at 1:47 AM, Dane O'Connor wrote: > Oh, and I forgot to add: If I understand this correctly, if I create this > mapping I can the

[fluent-nhib] Re: Mapping ternary association

2009-05-12 Thread HMS
That patch you posted looks pretty good! I was thinking something along the lines of: Assuming: IDictionary Bars; HasManyToMany(Foo => Foo.Bars) .AsMap("Bar") .WithIndexType(); Which looks pretty much the same as what you posted. Good going! On May 12, 4:52 pm, Stuart Childs

[fluent-nhib] Re: Automapping convention for CamelCase properties to columns with underscores

2009-05-12 Thread rob
Thanks guys. That's what I did (pretty much). I actually did it inline: James-- what are your thoughts on having a convenience method built-in to handle this scenario since it's a pretty common case? c.Add(ConventionBuilder.Property.Always(x => x.ColumnNames.Add (Inflector.Net.Inflector.Undersco

[fluent-nhib] Re: How do I map an entity with a prop erty who’s type is an interface?

2009-05-12 Thread Dane O'Connor
Oh, and I forgot to add: If I understand this correctly, if I create this mapping I can then just create a polymorphic association in the mapping for Employee right? On Tue, May 12, 2009 at 11:45 AM, Dane O'Connor wrote: > Hudson, > > Your certainly right. I'd be breaking the boundaries of polymo

[fluent-nhib] Re: How do I map an entity with a prop erty who’s type is an interface?

2009-05-12 Thread Dane O'Connor
Hudson, Your certainly right. I'd be breaking the boundaries of polymorphism. I thought I might have to in order to get this to work. I did a little more digging though and I found a better example and the correct terminology for what I'm trying to do. I want to create a table-per-concrete class

[fluent-nhib] Re: Filtering HasMany Collection

2009-05-12 Thread Stuart Childs
First off, if you have a many-to-many relationship, you probably want to be using HasManyToMany instead of HasMany. It sounds like your model looks like (or should look like) [apologies if my ASCII art breaks ;)]: /> Guest (Subclass of O

[fluent-nhib] Re: Dependencies

2009-05-12 Thread James Gregory
Repository was originally in use by people, but I'm fairly sure they're in the minority now (as we've had no issues or contributions to it for a very long time). There was talk of dumping it entirely, in which case we wouldn't need the linq dependency. I'll discuss this with the team, but if anyone

[fluent-nhib] Re: Dependencies

2009-05-12 Thread Stuart Childs
NHibernate.Linq is used for a Repository which (I believe) is only used by the unit tests. Perhaps the FluentNHibernate.Data namespace could simply be moved to the FluentNHibernate.Testing library which should move the dependency on .Linq from FNH proper to the test suite. I haven't tried though s

[fluent-nhib] Re: Mapping ternary association

2009-05-12 Thread Stuart Childs
I have a patch that implements this for which I'll open an issue. It adds an AsTernaryAssociation method to many-to-many relationships. If it's not correct or you think there is a better way to get the functionality, I think you'll want to start looking at ManyToManyPart.cs (and possibly ToManyBas

[fluent-nhib] Re: Mapping ternary association

2009-05-12 Thread Paul Batum
A good place to start might simply be what you would expect the fluent interface to look like for this feature. Any ideas? On Tue, May 12, 2009 at 6:11 PM, HMS wrote: > > Ok, I'll continue with that then. Is there any developer documentation > available? > I would like to look into adding suppo

[fluent-nhib] Re: Dependencies

2009-05-12 Thread Rei
James, is there are need for the reference to the nh linq assembly? I think it would be a better idea to strip out the repository implementation/interface, (separation of concerns thingy ^^). On May 11, 10:56 am, James Gregory wrote: > That list looks correct. Our only dependency is NHibernate a

[fluent-nhib] Filtering HasMany Collection

2009-05-12 Thread nformosa
Hi All, I have a problem with a many-to-many relationship. Basically i have a Contact Table which stores all the contacts. I have a ObjectContacts table which is a Link Table between Contacts and Various other tables such as Guests and Referrals. ObjectContacts has, apart from the 2 foreign keys

[fluent-nhib] Re: Mapping ternary association

2009-05-12 Thread HMS
Ok, I'll continue with that then. Is there any developer documentation available? I would like to look into adding support for this element into Fluent NHibernate, can you recommend a starting point? On 12 mei, 10:02, Paul Batum wrote: > Usually what we recommend is you map that particular entit

[fluent-nhib] Re: Mapping ternary association

2009-05-12 Thread Paul Batum
Usually what we recommend is you map that particular entity using plain old hbm xml. Its relatively straightforward to mix and match xml with fluent mappings. Take a look at this page on the wiki: http://wiki.fluentnhibernate.org/show/FluentConfiguration On Tue, May 12, 2009 at 5:55 PM, HMS wrote

[fluent-nhib] Re: Mapping ternary association

2009-05-12 Thread HMS
Ok... Is there a function to insert XML into the mapping generated by Fluent NHibernate? Or do I have to rely on editing the generated XML? On 12 mei, 09:03, Paul Batum wrote: > To the best of my knowledge, the index-many-to-many element is not supported > yet by fluent nhibernate. > > On Mon, M

[fluent-nhib] Re: Mapping ternary association

2009-05-12 Thread Paul Batum
To the best of my knowledge, the index-many-to-many element is not supported yet by fluent nhibernate. On Mon, May 11, 2009 at 8:03 AM, HMS wrote: > > Hello, > > I'm trying to map a ternary association in Fluent NHibernate. > > The result I would like to recreate is the following NHibernate HBM