Can you filter a column only in one direction? #780
-
If I would like to filter only when retrieving data, but not when submitting, is that easy to accomplish? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 5 replies
-
I don't understand your scenario, can you explain a little bit more in details ? |
Beta Was this translation helpful? Give feedback.
-
I have a blob data column whose data is generated by the clients, and they need to submit it to the server, but don't want to get all of the blob data from all clients synced back, because that data could be large and use up too much disk space on the clients. Trying to just ignore the column in both directions makes it difficult, because a full sync would need to complete before submitting the data to the server in a separate custom REST request... otherwise, it could not necessarily be associated to the record via a foreign key if that record isn't on the server yet. Using an interceptor on the server to strip the data from the OnTableChangesSelecting event seemed like a valid approach, but I haven't been able to make that work yet. I also tried to use the Converters, but wasn't able to make that work either. Not sure what the right feature to use is. |
Beta Was this translation helpful? Give feedback.
-
Removing the value on the Something I would try is to use 2 scopes:
I think it's worth a try |
Beta Was this translation helpful? Give feedback.
-
Ok, that seemed to work. Thank you :) Now I just need to figure out why some other thing is happening, where a particular table is not syncing. Maybe related to a .NET point release upgrade that I did. |
Beta Was this translation helpful? Give feedback.
-
Continuing along with this kind of thinking, I now have another use for this SyncDirection feature. Basically, I can add a Logs table as UploadOnly; In this case, I can have persistent local logging that can be saved even if there is no network connection, but it will still upload them later. And it won't try to download any of the logs from the server. This is very important and cool. Thanks again! Great tool. |
Beta Was this translation helpful? Give feedback.
Removing the value on the
OnTableChangesSelecting
will not help, because it will delete the value on the client, I think.I think using interceptor may help, but we can find another solution, maybe.
Something I would try is to use 2 scopes:
1st scope (let's say scope name "
all
") that contains all your tables and the table containing the blob has all columns without the blob column.This scope is
Bidirectional
(this is the default value).You will have all the rows, without the blob, and even if a conflict occurs or whatever, the blob on the client will never been touched.
Be sure the blob column allows null
Then I will do a 2nd scope with only the table with the blob, with all columns…