I don't think there's a better way. According to the docs, "All items in the
list value must be of the given type. item_type must be one of the datastore
value types, and cannot be list" so serializing your list seems like a
reasonable workaround.

- Jason

On Tue, Dec 22, 2009 at 1:27 PM, dhruvg <dhruv.g...@gmail.com> wrote:

> Your solution is doable. Is it the best way? Seems "hacky"
>
> On Dec 22, 4:17 pm, Robert Kluin <robert.kl...@gmail.com> wrote:
> > Do you need to query sub-sections of that data?  If not you may be
> > better off to serialize that to one big string (perhaps using JSON)
> > and store the string.
> >
> > If you do need to query sub-sections perhaps you could serialize each
> > pair to a string, something like 'key:value.'  Then to query for a
> > particular pair:
> >   MyModel().all().filter('listrpop', 'key1:val1' ).filter('listrpop',
> > 'key2:val2' )
> >
> > Robert
> >
> >
> >
> > On Tue, Dec 22, 2009 at 2:37 PM, dhruvg <dhruv.g...@gmail.com> wrote:
> > > The data I want to store can look something like this:
> >
> > > [['a','b'],['c','d']....]
> > > the key value pairs are all strings
> > > I know i have to use db.ListProperty(...)
> >
> > > But i am unsure what to put for item_type. I cannot put list since app
> > > engine forbids that. Any ideas?
> >
> > > Thx in advance.
> >
> > > --
> >
> > > You received this message because you are subscribed to the Google
> Groups "Google App Engine" group.
> > > To post to this group, send email to google-appengine@googlegroups.com
> .
> > > To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com>
> .
> > > For more options, visit this group athttp://
> groups.google.com/group/google-appengine?hl=en.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appeng...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.


Reply via email to