Hello,
Continuing my story ended at: http://forums.smartclient.com/showthread.php?p=62738, I stumble upon a next challenge: many to many tables.
Once I drag + drop an entry the saving happens automatically. But this is a problem, because it doesn't know the Flavour_id yet.
I have this Flavour_id locally in some variable, but how can I insert that just when the record is being saved (ie. 'onDrop')?
The cleverness of SmartGWT saves it automatically, but somehow misses the case of many to many relations, where there is an intermediate table connecting Pattern and Flavours (via the datasource Flavour_hasPatterns_Pattern in my case)
So I want to intervene here, and just before the save add an attribute via Record.setAttribute("Flavour_id", myFlavId); (or a similar solution)
Any thoughts?
Thanks.
Continuing my story ended at: http://forums.smartclient.com/showthread.php?p=62738, I stumble upon a next challenge: many to many tables.
Once I drag + drop an entry the saving happens automatically. But this is a problem, because it doesn't know the Flavour_id yet.
I have this Flavour_id locally in some variable, but how can I insert that just when the record is being saved (ie. 'onDrop')?
The cleverness of SmartGWT saves it automatically, but somehow misses the case of many to many relations, where there is an intermediate table connecting Pattern and Flavours (via the datasource Flavour_hasPatterns_Pattern in my case)
So I want to intervene here, and just before the save add an attribute via Record.setAttribute("Flavour_id", myFlavId); (or a similar solution)
Any thoughts?
Thanks.
Comment