Hi Timofey, On Fri, Jan 8, 2010 at 11:16 AM, Timofey Danshin <[email protected]>wrote:
> Hi. > I am writing a cms, which has sections and articles. Both of them are > represented by the same object of the type Node of my own composition. Among > other fields, a node has a Set<Node>, representing it's children. > Consequently, root nodes (i.e. sections have simple keys (say, Node(1))), > and articles have composite keys (say, Node(1)/Node(2)). > > And for the first page of my cms i would like to have a number of articles > disregard of the sections they are in. In order to do that i need to sort > the articles by their keys. However, in that sorted list they appear in the > wrong chronological order because of the "first part" of their keys. I.e., > apparently Node(1)/Node(7) will come earlier than Node(2)/Node(3). > > Is there a way to sort the entities in a query by the last part of their > keys? > If you want to do this, you'll need to add a new field with the desired sorting properties, and sort by that. -Nick Johnson > > -- > Best Regards, > Timofey Danshin. > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047--
You received this message because you are subscribed to the Google Groups "Google App Engine" 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/google-appengine?hl=en.
