Fabio Maulo pisze: > Your is only part of the story... now try to study de difference > between the semantic of a Bag and the semantic of Set. > > > 2009/7/31 Bartosz Pierzchlewicz <[email protected] > <mailto:[email protected]>> > > > A little supplement. > > This is more generic problem and I hope you not to tell me 'it is by > design'. > > When in DB you have Product P, which has two collections: Categories > {C1} and Attributes {Att1, Att2, Att3} > and you try to read it from DB: > > Repository<DbProduct>.FindFirst( > DetachedCriteria.For<DbProduct>(). > SetFetchMode("Categories", > FetchMode.Eager)). > SetFetchMode("Attributes", > FetchMode.Eager)); > > This is what you get: > P {Categories {C1,C1,C1} and Attributes {Att1, Att2, Att3}} > P {Categories {C1,C1,C1} and Attributes {Att1, Att2, Att3}} > P {Categories {C1,C1,C1} and Attributes {Att1, Att2, Att3}} > > I understand P duplicates, and I know how to get rid them, but what > about duplicates of C1 ? > > Bartosz Pierzchlewicz > Ps. sorry for more questions than answers > > > > > -- > Fabio Maulo > > > I know the difference, but as I wrote in my first post I can't use Sets.
You tell me that such behavior is intentional? Ok, but it is quite confusing, because it makes some inconsistency in domain model: we persist one object, but when we try to read it from DB again, we get object which is not identical. Any idea how to fix it in Castle ActiveRecord? Can I use IList interface but push it through Set? Bartosz Pierzchlewicz --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
