We're having a strange issue here. We have defined around 20 tables already
with foreign keys everywhere and working fine. Today we created two
additional tables but the foreign key dropdown isn't working for one of
them. (This is just using the database manager through appadmin)
Tables are:
db.define_table('orders',
Field('stores_id', db.stores),
Field('customer_id', db.auth_user),
Field('status', requires=IS_IN_SET(['New', 'Paid',
'In-Progress', 'Shipped', 'Cancelled'])),
Field('subtotal', 'double'),
Field('shipping', 'double'),
Field('discount', 'double'),
Field('order_time', 'datetime')
)
db.define_table('order_details',
Field('orders_id', db.orders),
Field('product_name'),
Field('product_options'),
Field('quantity', 'integer'),
Field('price', 'double')
)
When adding a new order_details item, the orders_id field is a text input
instead of a foreign key dropdown. The foreign key was created
automatically in the database, but it's not being reflected in the form.
This isn't a huge problem since this won't be something you use a form to
administer, but it's still worrying that something so key appears to be
broken for this table only.
Did I make a typo somewhere that I'm missing?
--