Forum OpenACS Q&A: Response to SQL: how do you do this?

Collapse
Posted by Jonathan Ellis on
I'm still confused...

Seems to me that the _vf to _vf_quantity relationship is many-to-one.  So I don't understand why you'd need the _vf_quantity to have a key back to the _vf table, unless it were an entirely different _vf from the one already keying to it but that doesn't seem to be the case from your description.  (If it is instead many-to-many you'd need a separate mapping table but you already know that which is why I'm confused. :)

second, what kind of state is selected_q maintaining vs default_q?  Is this like the "user default" and "factory default?"  if so selected_q should probably be in a table keyed off user to provide more flexibility.  But if you really want one global value it is fine as it is.