Currently, there is no way for a batch store operation to implement the
INSERT .. ON DUPLICATE KEY UPDATE or MERGE semantics that you intend for it
to do. Batch store is simply a batch version of the ordinary
UpdatableRecord.store() operation, which makes the decision whether to
INSERT or UPDATE the record in the client, not the server.
I suggest you actually run a set based INSERT .. ON DUPLICATE KEY UPDATE
statement, or a MERGE statement instead.
I have done it with the different approach, by using a common interface
UpdatableRecord, first I have used a fetchOne() query to get the record on
the basis of the unique constraint which will give the UpdatableRecord and
then set the values with the updated ones which are then added to
userRecordlist which will be further passed into batchStore which will
decide either to insert or update. I think this approach is also fine. What
On Friday, 15 September 2017 02:33:16 UTC+5, Lukas Eder wrote:
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to [hidden email].