[fluent-nhib] Re: Composite Key for resolving Many to Many Relationship

2009-03-13 Thread sianabanana
Looking in to this some more, i dont think what im trying to acheive can be done. I found this issue in the log which seems to describe the problem im having. http://code.google.com/p/fluent-nhibernate/issues/detail?id=27 I think if i tried to make a composite id that was of simple types like

[fluent-nhib] Re: Composite Key for resolving Many to Many Relationship

2009-03-13 Thread James Gregory
Just replied to another thread about this. We don't support complex composite-ids (one's that are essentially components) right now. I would wholeheartedly recommend that you don't use composite-ids if at all possible, use surrogate keys. On Fri, Mar 13, 2009 at 9:56 PM, sianabanana

[fluent-nhib] Re: Composite Key for resolving Many to Many Relationship

2009-03-11 Thread sianabanana
No more responses? Any one can shed any light. Here is the code from the example console application if anyone wants to have a go? using System; using System.Collections.Generic; using System.Linq; using System.Text; using FluentNHibernate; using Domain; using FluentNHibernate.AutoMap; using

[fluent-nhib] Re: Composite Key for resolving Many to Many Relationship

2009-03-11 Thread James Gregory
Neither of us said we don't like composite-ids, although that may be the case, we just don't have a great deal of experience using them. This is why we're not being all that helpful, because we don't fully understand them ourselves. You have to appreciate that for FNH to support a feature, all we

[fluent-nhib] Re: Composite Key for resolving Many to Many Relationship

2009-03-11 Thread sianabanana
If i swap the WithKeyRefrence to WithKeyProperty i get a mapping error on start up. It then cannot map the OrderProduct I wouldnt know where to start making some test cases for this? I dont know what you would expect to receive from me? On Mar 11, 3:37 pm, James Gregory

[fluent-nhib] Re: Composite Key for resolving Many to Many Relationship

2009-03-11 Thread sianabanana
I think thats where i was about to look next. I will do this and then update. Thanks again for the support so far, On Mar 11, 3:48 pm, James Gregory jagregory@gmail.com wrote: Well, if you're not able to write tests, then another way would be to get the behavior you desire to work

[fluent-nhib] Re: Composite Key for resolving Many to Many Relationship

2009-03-10 Thread Andrew Stewart
Hi Can I ask you to check a few things, we'll take your service out of the equation to start with. Order o = new Order(); o.OrderDate = DateTime.Now; Session.SaveOrUpdate(o); Product p = new Product(); p.Name = Custom Item; Session.SaveOrUpdate(p); OrderProduct op = new OrderProduct();

[fluent-nhib] Re: Composite Key for resolving Many to Many Relationship

2009-03-08 Thread James Gregory
I'm not really familiar with composite keys in a production environment (nothing outside of writing the code to support it in FNH), could you give me an example of the actual code you're using to save your entities? Even more helpful would be if you could reduce your mappings down to the bare

[fluent-nhib] Re: Composite Key for resolving Many to Many Relationship

2009-03-08 Thread sianabanana
Thanks for your reply james, The above code is the acual code for my domain objects and my mapping override classes. I would then call the following code to pouplate the objects Order o = new Order(); o.OrderDate = DateTime.Now; Product p = new Product(); p.Name = Custom Item; OrderProduct

[fluent-nhib] Re: Composite Key for resolving Many to Many Relationship

2009-03-07 Thread sianabanana
Any ideas? I could really do with some help on this one. Much appriciated :) On Mar 6, 11:40 pm, sianabanana sianm...@hotmail.com wrote: I have a more complex many to many relationship and need to create the link between the manys as an object to store further data. Order  - id, date Order