No. We have discussed implementing this. The problem is that the only efficient way to do this is via a join. Without a join it would be slow. By using a join it would not work on GAE. To make it efficient on GAE one would have to denormalize or cache them. I think these are important design issues I am not convinced they should he hidden from the developer into a validator. I am not sure there is one size fit all. Hiding too much logic into the validator would result in too many people complaining that this is not doing quite what they expect.
Anyway, you can design your own validator that does it without need to modify web2py. Once we have such validator, if there is overwhelming support for it, we can include it in web2py or replace the existing IS_IN_DB. Massimo On Nov 21, 4:33 pm, Alex <person...@gmail.com> wrote: > It is possible to use several items in IS_IN_DB label, but how to use > column name from refrence table? > > For example 3 tables: > > type_class (type_class_name) > type (type_class_id, type_name) > detail (type_id, detail_name) > > I can do for "requires" in detail table this: > requires=IS_IN_DB(db, 'type.id', '%(type_name)s' > > but how can i include 'type_class_name' there? > like: > requires=IS_IN_DB(db, 'type.id', '%(type_class_id.type_class_name) --- > %(type_name)s' > or > requires=IS_IN_DB(db, 'type.id', '%(type_class_name) --- %(type_name)s' --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" 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 -~----------~----~----~----~------~----~------~--~---