Anne,

Thanks for the post - It was due to my own abstractions that things broke!

I thought it would be easier to use a BaseCompositeEntity class to do the 
overriding over the equals and HashCode for us (Looking back this was a bit 
stupid).

So I was overriding only to use the base.Equals (thus putting things back 
were they were!)

Overriding the Equals and GetHashCode methods properly corrected the issue!

Thanks for this!

On Tuesday, April 17, 2012 5:40:46 PM UTC+1, [email protected] wrote:
>
> Stu, take a look here:
>
> http://nhforge.org/blogs/nhibernate/archive/2010/07/01/nhibernate-and-composite-keys.aspx
>  
> specifically, the "ID Object" section - that section is talking 
> identifiers in regards to caching, but I suspect you are hitting the same 
> issue in a slightly different way. 
>
>
>
> On Tue, Apr 17, 2012 at 10:24 AM, StuS <[email protected]> wrote:
>
>>   I have the following HQL statement:
>>
>> select distinct t from TaskEntity as 
>>
>> inner join fetch t.Case as c
>>
>> inner join fetch c.Client as client 
>>
>> inner join fetch c.Matter as matter
>>
>> However, despite Matter having a FETCH against it, it's still returning 
>> as a proxy.
>>
>> My mapping for this object is below
>>
>> References(x => x.Matter).Columns(new[] {"c_client","c_matter" });
>>
>> I read about in various places, that this is due to a composite key, but 
>> I never found any solutions - any ideas?
>>
>> Any thoughts?
>>
>> Thanks,
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "nhusers" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/nhusers/-/bQ1J8KWlj28J.
>> 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.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/nhusers/-/duE7yG4UnPkJ.
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