[fluent-nhib] Conversion to new Conventions

2010-03-24 Thread sianabanana
I am trying to convert over to new conventions I used to use these conventions GetPrimaryKeyNameFromType = type => type.Name + "Id", GetManyToManyTableName = (parent, child) => parent.Name + "_" + child.Name, GetForeignKeyNameOfParent = type => type.Name + "Id", GetForeignKeyName = type => type.N

[fluent-nhib] Re: Eager Load Property Expand - Still have N+1 problem

2010-03-03 Thread sianabanana
Bump! anyone with any ideas? On Mar 1, 1:24 pm, sianabanana wrote: > Hi, > > I have a One - To - One relationship > > Product may have 0 or 1 CustomItem > CustomItem refrences Product > > my database model simplified is > > Product table - columns - ProductId, C

[fluent-nhib] Eager Load Property Expand - Still have N+1 problem

2010-03-01 Thread sianabanana
Hi, I have a One - To - One relationship Product may have 0 or 1 CustomItem CustomItem refrences Product my database model simplified is Product table - columns - ProductId, CutomItemId Custom Item table - columns - CustomItemid, Additional information public class Product { public

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

2009-03-13 Thread sianabanana
OrderID and ProductId it might work. But i think the problem is that it cannot cope with the complex types that im trying to implement. Order and Product. Anyone else have any ideas about this? On Mar 11, 3:50 pm, sianabanana wrote: > I think thats where i was about to look next. > >

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

2009-03-11 Thread sianabanana
NHibernate using the xml > mappings. If you can succeed at that, then we can compare the mappings > you're using with that to what FNH is generating > > read more » > > > > On Wed, Mar 11, 2009 at 3:42 PM, sianabanana wrote: > > > If i swap the WithKey

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

2009-03-11 Thread sianabanana
> bug it never regresses. A console app will require one of us to derive tests > from it, which takes more work > > read more » > > It may be my naïvety showing, but I believe you should be using > WithKeyProperty rather than WithKeyReference. I could be wrong though. > >

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

2009-03-11 Thread sianabanana
//.WithForeignKey("Id").TheColumnNameIs("OrderId"); //map.References(x => x.Product) //.WithForeignKey("Id").TheColumnNameIs("ProductId"); } } } On Mar 10, 11:14 am, sianabanana wrote: > I do under

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

2009-03-10 Thread sianabanana
derProduct would probably resolve your issue, plus is the recommended > best practice now a days. > > Cheers > > Andy > > > > > > On Tue, Mar 10, 2009 at 10:12 AM, sianabanana wrote: > > > Any ideas james, > > > I have tested deleting updating and sele

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

2009-03-10 Thread sianabanana
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 > minimum needed to reproduce the problem. > > > > On Sun, Mar 8, 2009 at 12

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

2009-03-08 Thread sianabanana
ve your entities? Even > more helpful would be if you could reduce your mappings down to the bare > minimum needed to reproduce the problem. > > > > On Sun, Mar 8, 2009 at 12:07 AM, sianabanana wrote: > > > Any ideas? I could really do with some help on this one. >

[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 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 >

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

2009-03-06 Thread sianabanana
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 Product - orderid, productid, quantity Product - id, name I am using auto mapping, and i am overriding the mapping to specify anything that