There are two tables:
or_organisation (id, name, sector_id, ...)
and
or_sector(id, name, ...)
And the sector_id is pointing to or_sector.id through the "reusable"
field concept.
It is all fine when I pull the or_organisation records and then use
method represent to fill in the or_sector.name to display.
But if we want the MySQL (or any other engine) to get the right
related or_sector.name to
a) order it via ... ORDER BY or_sector.name DESC and
b) search it via WHERE or_sector.LIKE '%context%
the DAL 'left' construct does not work because the type of reusable
field is 'string' and not numeric:
left=or_sector.on(or_sector.id = or_organisation.sector_id)
What's more, it is having, say, u'|1|' which can be converted to 1
via specific CAST and TRIM.
Is there any way to do that for table.on method?
OR how do we pull joins otherwise?
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.