Hi Anthony,
Thanks for your reply. Update problem solved.
I have another problem related to this one, deleting a customLabel.
The table ntw_edge contains the field label:
Field('label', length=128, default='', requires=IS_IN_DB(db, 'ntw_edge_label_set.customLabel', '%(customLabel)s', orderby='ntw_edge_label_set.customLabel', zero=T("Select a value")), ondelete='RESTRICT', notnull=True),
The table 'ntw_edge_label_set' contains the field:
Field('customLabel', length=128, requires=[IS_LENGTH(32), IS_NOT_EMPTY()]),
Normally ondelete cascades the delete, so when I delete a customLabel all records in ntw_edge containing
that label will be deleted. However, in this case only the records with outID == user_id should be deleted.
Am I right I have to delete the records from ntw_edge first and then delete the record from ntw_edge_label_set
db((table.outID==user_id) &
(table.label==form.vars.customLabel)).update(label=form.vars.customLabel)
db(
db.ntw_edge_label_set.id==int(request.vars.row)).delete()
Or is there a better way to do this?
Kind regards,
Annet
Best regards,
Annet