Hi

I have the following model (simplified):

    class Item
    {
        public InternationalisedString Name { get; set; }
    }

    class InternationalizedString
    {
        public ICollection<LocalizedString> LocalizedStrings { get;
set; }
    }

    class LocalizedString
    {
        public string Value { get; set; }
        public string Language { get; set; }
    }

So, each Item.Name could have several translations associated with it.

When the current user requests a list of Items, their names need to be
displayed in the user's Language, paged and sorted.  However, if a
particular Item's name hasn't been translated into the user's
Language, it should be displayed in a default 'fall-back' language.

What I'd like to do is write a HQL or Criteria query to retrieve a
paged, sorted, list of Item names.

I've tried to come up with a solution for quite a while, but just
can't get it working.  Obviously I can use native SQL if necessary,
but it's something that I've avoided so far.

Any help would be much appreciated.

--~--~---------~--~----~------------~-------~--~----~
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