That's a good point. Picking up on that then, it sounds like the
better implemenation would then be to have the entity contain a
private collection to hold the id components and then have the generic
code cycle through that. I had initially given thought to this - but
with that, I had not considered the SoC issue...

Writing the code is not that big of a deal...and this only matters
with composite keys anyway. Given that the mapping classes are there
to produce mapping files...not expose properties, I see why properties
like this are not exposed.

Thanks for responding so quickly!!

JP


On Aug 5, 10:14 am, James Gregory <[email protected]> wrote:
> In theory it sounds ok, but wouldn't that mean your entities would have to
> be aware of FNH?
>
> On Wed, Aug 5, 2009 at 3:11 PM, johnvpetersen <[email protected]>wrote:
>
>
>
>
>
> > I wanted to come up with a generic way to deal with the Equals() and
> > GetHashCode() methods in the event a composite key is used. I figured
> > if I could iterate through a collection, in the event a composite key
> > was involved, I could write a generic piece of code.
>
> > JP
>
> > On Aug 5, 9:40 am, James Gregory <[email protected]> wrote:
> > > For what purpose?
>
> > > On Wed, Aug 5, 2009 at 2:33 PM, johnvpetersen <[email protected]
> > >wrote:
>
> > > > This one has me stumped. Is it possible, through an instance of a
> > > > mapping class, to fetch (iterate through) the individual parts of a
> > > > composite key?- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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