Hi,

I've been searching about this but can't found any info abut it. 

I have an application which locally work well, but when I upload and test 
it in google app engine this line gives me error:

    for row in db(db.posts.thread_id==thread_id).select(orderby=db.posts.
post_date):


Google app engine  thows this error:

(dp0 S'output' p1 S"<class 
'google.appengine.api.datastore_errors.NeedIndexError'> no matching index 
found.\nThe suggested index for this query is:\n- kind: posts\n 
properties:\n - name: thread_id\n - name: post_date" blablabla

As you can see it seems to have some issue with the index "post_date" but 
is really declared. If instead of .post_date I order by id or thread_id, 
everything works fine in GAE, but not with post_date.

See the table declaration:

db.define_table('posts',  Field('thread_id','integer'),
                          Field('user_id','reference users'),
                          
Field('post_message','text',requires=IS_LENGTH(minsize=2,maxsize=800),
                          #Field('post_message','text',label=''),
                          Field('like_author','boolean',default=False),
                          Field('likes','integer',default=0),
                          Field('post_date', 'datetime')
                          )


What can be happening here? I really have no idea. I have tried also to run 
the query inside of gae interfacer using gae interface: SELECT * FROM posts 
ORDER BY post_date 
and it works without problem.

Any help? thanks in advance

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to