This is my latest best try, but it still returns a syntax error when
executing (not when compiling) :
db.define_table('guitar',
Field('brand',type='string'))
db.define_table('customer',
Field('name',type='string'),
Field('guitar_ref',type='list:reference guitar'))
db.customer.guitar_ref.requires=IS_IN_DB(db,'guitar.id',multiple='True')
db.define_table('invoice',
Field('work_todo',type='text'),
Field('customer_ref',type='reference customer'),
Field('guitar_ref',type='reference guitar'))
db.invoice.customer_ref.requires=IS_IN_DB(db,'customer.id')
db.invoice.guitar_ref.requires=IS_IN_DB(db(lambda
row:db.customer[db.row.customer_ref].guitar_ref==db.guitar._id),'guitar.id')
Error returned :
<class 'sqlite3.OperationalError'>(near "<": syntax error)
(self=<pydal.adapters.sqlite.SQLiteAdapter object>, *a=('SELECT guitar.id
FROM guitar WHERE ((guitar.id ... <lambda> at 0x7f7face09938>) ORDER BY
guitar.id;',), **b={})
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.