in NH it is possible with 0 problems.

2010/3/25 Colin Bowern <[email protected]>

> Perhaps I can open up the discussion by providing a bit more
> background.  The table relationship can be viewed as such:
>
> Equipment -(r1)- ObjectAttachments -(r2)- Attachments
>
> r1 is defined by Equipment.Id = ObjectAttachments.Object_Id AND
> ObjectAttachments.Class = 'Equipment'
> r2 is defined by ObjectAttachments.Attachment_Id =
> Attachment.Attachment_Id
>
> The thing that is throwing me for a loop is Equipment.Id is an integer
> data type and ObjectAttachments.Object_Id is a string.
>
> On Mar 19, 2:11 pm, Colin Bowern <[email protected]> wrote:
> > I have a join table where the original table is a numeric type and the
> > join table key column is a string type. Legacy decision that I am
> > trying to avoid having to change to minimize the risk to the scope of
> > work.
> >
> > HasManyToMany<Attachment>(x => x.Attachments)
> >   .Table("ObjectDocuments")
> >   .ParentKeyColumn("ObjectId")
> >   .ChildKeyColumn("DocumentId")
> >   .Fetch.Select()
> >   .LazyLoad()
> >   .AsBag();
> >
> > The owning class uses a long (numeric) type for the identifier, while
> > the join table uses a string type for the object identifier. How could
> > I map this for it to change the data type on the fly? Is there
> > something I can use to intercept and do the conversion?
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>


-- 
Fabio Maulo

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" 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/nhusers?hl=en.

Reply via email to