Deja vu :)
http://groups.google.com/group/fluent-nhibernate/browse_thread/thread/f6badbe4aca0803e?hl=en

<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 you've got an inverse set on that collection, all of your
saves will have to happen on the child side (from table B), so make sure
that that class B has a References() back to class A.

On Fri, Jun 19, 2009 at 9:08 AM, Allen Wilson <[email protected]> wrote:

>
> Hello....
>
> I am trying to set up a relationship with HasMany....
>
> In table A, I have the fields GUID_ACCOUNT_ID (primary key) and
> ACCOUNT_ID.
>
> In table B, I have the fields TRANS_ID and ACCOUNT_ID. The ACCOUNTID
> is a foreign key for ACCOUNT_ID in table A (yes...the table is
> somewhat badly designed but I have to work with it). I want to set up
> a relationship between the two tables using the ACCOUNTID. Here is my
> code
>
>
>            HasMany(x => x.Transaction_List)
>                .KeyColumnNames.Add("ACCOUNT_ID")
>                .Inverse()
>                .FetchType.Join()
>                .Cascade.SaveUpdate();
>
> When ran, I do not get any data back because the relationship is
> establish between the GUID_ACCOUNT_ID and ACCOUNT_ID...which is
> incorrect. How can I set the relationship up so that that ACCOUNT_ID
> in table A is used instead of the GUID_ACCOUNT_ID
>
>
> Thanks....Allen
> >
>


-- 
- Hudson
http://www.bestguesstheory.com
http://twitter.com/HudsonAkridge

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to