I have something like this( simpyfing )
ObjectA
{
  DictionaryItem Status;
}
DictionaryItem
{
  IList<DictionaryItemTranslation> CurrentTranslations;
}
DictionaryItemTranslation
{
    string BuisnessObjectName
}

additionaly CurrentTranslations can be only 0/1 ( has to be maped as a
list, cause we still can`t use  "where/filter" with many-to-one :( ).

I have a grid which display ObjectA and everthing works fine till i
try to sort by BuisnessObjectName, criteria is like this :
CreateCriteria<ObjectA>()
.CreateCriteria("Status")
.CreateCriteria("CurrentTranslations", JoinType.LeftOuterJoin )
.AddOrder(Order.Asc("BuisnessObjectName"))

the effect is CurrentTranslations have 3 elements, it is the same
instance of DictionaryItemTranslation.
If i change JoinType to InnerJoin( or just leave default ) it works
ok, only 1 element in collection.
SQL is fine, data in db are fine too,  the only difference is in
jointype the problem is somehow when jointype is leftOuterJoin it adds
the same object 3 times to collection. Any ideas why?




--

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