[fluent-nhib] Re: Establishing a relationship other than the Primary key

2009-06-19 Thread Hudson Akridge
I would then recommend mapping the ACCOUNT_ID as your Id(), especially if that's what's used as a reference for other child tables. It won't affect your database structure, it's just a way to tell NHibernate what to use for a primary key during association fetching. If you use both GUID_ACCOUNT_ID

[fluent-nhib] Re: Establishing a relationship other than the Primary key

2009-06-19 Thread Allen Wilson
Thanks...I read through it again and I did see the PropertyRef information you were referring to. Tried it and it still did not help my issue...the way the tables are set up there is a one to many relationshp...therefore i need the HasMany but without the field in table A being the primary key I a

[fluent-nhib] Re: Establishing a relationship other than the Primary key

2009-06-19 Thread Hudson Akridge
Not sure where you're getting the HasManyToMany from. :) That thread is on the one-to-many from users to orders. Reread it if you could, you're looking for the PropertyRef() method. Or setting the accountid as your primary key in the mappings (you shouldn't need to change that in the database). On

[fluent-nhib] Re: Establishing a relationship other than the Primary key

2009-06-19 Thread Allen Wilson
Tried to use the HasManyToMany and it actually caused the same problem that I have in another post. The relationship is not a HasManyToManythere can only be one ACCOUNT_ID in table (there is a unique index set on itto the poor design again). I need to use the HasOneToMany but be able to i

[fluent-nhib] Re: Establishing a relationship other than the Primary key

2009-06-19 Thread Hudson Akridge
Deja vu :) http://groups.google.com/group/fluent-nhibernate/browse_thread/thread/f6badbe4aca0803e?hl=en That thread should contain a couple solutions to what you're looking to do. Also, remember, since yo