Is there any solution for this problem?
On 12月20日, 下午3时27分, sharekey <share...@gmail.com> wrote:
> many to many relation select do not work on GAE too.
>
> I try the dal example code on GAE as below:
> tmp=db.define_table('author',SQLField
> ('name'),migrate='test_author.table')
> tmp=db.define_table('paper',SQLField
> ('title'),migrate='test_paper.table')
> tmp=db.define_table('authorship',SQLField
> ('author_id',db.author),SQLField
> ('paper_id',db.paper),migrate='test_authorship.table')
> aid=db.author.insert(name='Massimo')
> pid=db.paper.insert(title='QCD')
> tmp=db.authorship.insert(author_id=aid,paper_id=pid)
> authored_papers=db((db.author.id==db.authorship.author_id)&
> (db.paper.id==db.authorship.paper_id))
> rows=authored_papers.select(db.author.name,db.paper.title)
>
> I also get message "SyntaxError:SQLQuery:right site of filter must
> be a value or
> entity"
>
> On 12月20日, 下午2时53分, sharekey <share...@gmail.com> wrote:
>
>
>
> > Hi all,
>
> > I defined a table as below:
>
> > db.define_table('category',
> > SQLField('parent_id', 'integer'),
> > SQLField('child_id', 'integer'),
> > SQLField('sort_id', 'integer'),
> > SQLField('name'),
> > SQLField('description'))
>
> > I want to select the records which parent_id=id as:
> > categorys=db(db.dl_category.id==db.dl_category.parent_id).select()
>
> > It don't work on GAE, dev_appserver console output:
> > SyntaxError:SQLQuery:right site of filter must be a value or
> > entity
>
> > It work on build-in server, how can I do it on GAE?- 隐藏被引用文字 -
>
> - 显示引用的文字 -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to
web2py+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---