0 Replies Latest reply on Aug 8, 2012 2:34 AM by litpuvn

    concat expression<Collection<T>>

      Hi all,

      I have a mapping in my entity, one to many mapping, example relationship "1 question -> many answers"

      so, in Question class, i can access a collection of "Answers"; But in my criteria query, i need to concat all "Answers' summary" for sorting purpose. ("summary" is a field in Answer class)

      I can get:
        Expression<Collection<T>> e = root.get("answers") 
      but i don't know how to create sorting criteria for concatenation of all summary that an answer has.

      I have googled around, but i haven't found a way to do it.

      thank you for your help


      -Hoang Long

      Edited by: CardM on Aug 7, 2012 7:34 PM