Writeback in different table

General questions regarding the development with JVx.

Writeback in different table

Postby jvxdev » Fri Mar 04, 2016 6:03 pm

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?
jvxdev
 
Posts: 19
Joined: Fri Mar 04, 2016 12:40 pm

Re: Writeback in different table

Postby Support@SIB » Fri Mar 04, 2016 6:13 pm

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().
User avatar
Support@SIB
 
Posts: 200
Joined: Mon Sep 28, 2009 1:56 pm


Return to Development