Page 1 of 1

Writeback in different table

PostPosted: Fri Mar 04, 2016 6:03 pm
by jvxdev
I have an editable table with a checkbox in it (direct editing). I won't save the value in the original table, instead I want to change another table and other column(s).

I couldn't find an option in RemoteDataBook. Is it possible to implement such a feature?

Re: Writeback in different table

PostPosted: Fri Mar 04, 2016 6:13 pm
by Support@SIB
The client doesn't support this feature, because it's "business logic" and the right place for such things is on the server-side. The DBStorage has insteadOf events: eventInsteadOfInsert, eventInsteadOfUpdate, eventInsteadOfDelete.

If you use custom insteadOf events, the default implementation won't be used. It's in your hands and you can write whatever you want.


Additional information

The client doesn't send changed values to the server if your storage doesn't use a writeback table. It's a security mechanism, but you can change the default handling if you call:

Code: Select all
dbstorage.getMetaData().addFeature(Feature.WriteBack);

after dbstorage.open().