DA/OSX, Relativity and Transactions?

Hi,

I have the following code:

NSArray *tablesToSend = [NSArray arrayWithObjects:self.visitsTable,self.colTable, self.colPaymentTable,self.colDetailTable,self.orderTable,self.customerInventory, self.orderDetailTable,self.paramsTable, self.coopTable, self.coopDetailTable,self.planTareaTable,self.planVisitaTable,self.contractsTable,self.evaluationTable, self.orderPromotionsTable, self.depositDetailTable, nil];

[rda applyChangesForTables:tablesToSend];

I would like to know if this update is protected by a transaction, ALL or NOTHING??

I had a strange behavior, with updates failing with ‘self.colDetailTable’ but changes in ‘self.orderTable’ persisted on the server.

Regards,

If you apply all changes in one call,mad shown in your code snippet, this should all be handles within one transaction, server side, yes.

Thanks, just confirming. Maybe this was an isolated issue, should it happen again i’ll let you know.

Please do, this sounds like it would be a bug, if this really happens…

Hi Mark,

Guess what, it happened again, and several times!

The following code:

NSArray *tablesToSend = [NSArray arrayWithObjects:self.visitsTable,self.colTable, self.colPaymentTable,self.colDetailTable,self.orderTable,self.customerInventory, self.orderDetailTable,self.paramsTable, self.coopTable, self.coopDetailTable,self.planTareaTable,self.planVisitaTable,self.contractsTable,self.evaluationTable, self.orderPromotionsTable, self.depositDetailTable, nil];

[rda applyChangesForTables:tablesToSend];

I would like to know if this update is protected by a transaction, ALL or NOTHING??

Updates failing with ‘self.colDetailTable’ but changes in ‘self.orderTable’ persisted on the server.

BTW: The update failing was due to a bug in our logic, resulting in PRIMARY KEY error, but anyway, we expected that NONE of the tables would have been updated.

We are using: Relavity Server, Connected to SQL Server 2008 from iOS 5.1 client. DA: Winter 2012.

Regards,

thanx. i’ll ask Anton to have a look and get back to you tomorrow, he knows this stuff best.

Hello

Please check this Relativity FAQ entry: http://wiki.remobjects.com/wiki/Data_Access_FAQs_(Relativity_Server)#How_can_I_rollback_entire_data_update_transaction_if_one_of_provided_changes_cannot_be_applied.3F

It contains full explanation and workaround for this issue.

Hope that helps

Thanks i will git a try immediately