A select always returns a Rows object, not a Row object, even if there is always one record. So, instead, do:
row = db(db.weets.posted_by == user).select( join=db.auth_user.on(db.weets.posted_by == db.auth_user.id)).first() Anthony On Thursday, February 20, 2014 12:18:33 AM UTC-5, contact.ur...@gmail.com wrote: > > Hi, > Maybe a stupid question but here goes. > > I am trying to do the following join. > > row = > db(db.weets.posted_by==user).select(join=db.auth_user.on(db.weets.posted_by== > db.auth_user.id)) > > its seems to work and row does return. > The example in the book then shows you can use attributes but when i try: > > row.auth_user.name > > or other field it says no attribute auth_user. > > i am not sure why this is? > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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.