If I want a planet record to point to another planet record?

If I use the following...

db.define_table('planet',
                Field('radius', 'integer'),
                Field('previous_planet', db.planet, requires=IS_NULL_OR
(IS_IN_DB(db,db.planet.id,'%(id)s'))))

I get KeyError: 'planet' which makes sense as planet doesn't exist at
the point I 'try' and refer to it.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@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.

Reply via email to