[fluent-nhib] Re: PersistenceSpecification question

2009-04-02 Thread depaulo
Sorry to butt in but is it something to do with the .WithColumns("ProjectID"); in References(x => x.Project).Cascade.All().WithForeignKey ("ProjectID").WithColumns("ProjectID"); I have just found that if I have a ParentID property in my Child object and then use References(x => x.Parent, "Pare

[fluent-nhib] Re: PersistenceSpecification question

2009-03-24 Thread James Gregory
It's most definitely something wrong with FNH, most likely something wrong with the PersistenceSpecification. What's wrong, I couldn't tell you. This is going to require more research on my part. On Tue, Mar 24, 2009 at 1:30 PM, Bill wrote: > > Hi, > > So, I'm trying to understand - this is an i

[fluent-nhib] Re: PersistenceSpecification question

2009-03-24 Thread Bill
Hi, So, I'm trying to understand - this is an issue with PersistenceSpecification or Fluent NHibernate, not a problem with NHibernate itself, correct? My complete entity heirarchy seems to be working in my application - I just can't figure out how to use PersistenceSpecification to test it. than

[fluent-nhib] Re: PersistenceSpecification question

2009-03-23 Thread Bill
Thanks again James. I really appreciate all you're doing to try and help. I understand the trial and error part. :) I tried using a single ID instead of the composite and get the same error. But from what Derik said, it looks like I am still using the ProjectID key in both places. Here's my late

[fluent-nhib] Re: PersistenceSpecification question

2009-03-23 Thread James Gregory
My mistake, I've just looked at the code and WithForeignKey is for setting the actual constraint name, so that's my point out of the window. I'm guessing now it's a conflict between your composite-id and references, are you able to test the behavior if you use a regular identity over a composite on

[fluent-nhib] Re: PersistenceSpecification question

2009-03-23 Thread Bill
Thanks James! This is an interesting problem. I can see the similarities to what I have except that Derik's example is with a property... for mine it is an identifier. If I remove the .WithColumns("ProjectID") then it generates it's own column name like this:

[fluent-nhib] Re: PersistenceSpecification question

2009-03-23 Thread James Gregory
Sorry Bill, I was out last night and missed your last message. Derik Whittaker actually blogged very recentlyon your exact error message. It's basicall

[fluent-nhib] Re: PersistenceSpecification question

2009-03-22 Thread Bill
I tried a bunch of things but really don't have a clue what that error I am getting means. Maybe if I could see an example of using a HasMany and then the Reference back with the PersistenceSpecification I could make some sense of it. Not sure what else I might try. Any suggestions would be apprec

[fluent-nhib] Re: PersistenceSpecification question

2009-03-22 Thread Bill
I set Cacasde.All() on the Reference like this: // Reference back to parent Project References(x => x.Project).Cascade.All() .WithForeignKey("ProjectID").WithColumns("ProjectID"); I get the same error System.IndexOutOfRangeException: Invalid index 6 for

[fluent-nhib] Re: PersistenceSpecification question

2009-03-22 Thread James Gregory
Hmm, try setting a Cascade on that relationship. On Sun, Mar 22, 2009 at 6:38 PM, Bill wrote: > > Hi, > > I'm new to FNH and NH and have made some progress with getting my > classes mapped using Fluent. Then I found the > PersistenceSpecification. My question is that when I am just checking > ag