Re: [web2py] DAL db.table.field.contains

2013-11-21 Thread Richard Vézina
Each book that refer to an Author will only has one Author what the problem there? You may want to aggregate the book for one author in the same cell of a table that is another thing that you could address in different way... Most probably iter over all the book for an author and build manually a

Re: [web2py] DAL db.table.field.contains

2013-11-21 Thread Richard Vézina
.contains() should do that... Could you post model and controller, the issue is maybe somewhere else in your code. Richard On Thu, Nov 21, 2013 at 9:59 AM, Kevin Bethke wrote: > each book has one author but I want to select all Books which have Author > id=7 > > > On Thu, Nov 21, 2013 at 3:30

Re: [web2py] DAL db.table.field.contains

2013-11-21 Thread Kevin Bethke
each book has one author but I want to select all Books which have Author id=7 On Thu, Nov 21, 2013 at 3:30 PM, Richard Vézina wrote: > Each book that refer to an Author will only has one Author what the > problem there? > > You may want to aggregate the book for one author in the same cell of

Re: [web2py] DAL db.table.field.contains

2013-11-21 Thread Richard Vézina
Also, version of web2py and backend you use may be helpfull, if you found a bug... Richard On Thu, Nov 21, 2013 at 10:08 AM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > .contains() should do that... > > Could you post model and controller, the issue is maybe somewhere else in > your

[web2py] DAL db.table.field.contains

2013-11-21 Thread BlueShadow
Hi I got two tables Books and Authors Book(Name,List:Author,...) each book has at least one author now I want to have a list of all the books one Author has written. So I came up with this line of code: l=db(db.Books.Author.contains(Author.id)).select(db.Books.ALL, orderby=db: Books.Name) which wor