#1 2016-10-28 19:17:37

Stemon63
Member
Registered: 2016-10-24
Posts: 49

ORM and ApplyUpdates

Hi,
I'm new to mORMot, and I will try the porting of entire dataset solution in a new that use only ORM.
So I use Tobjectlist and live binding for UI.
I want to use your Batch operations on "Save All" operation, but I need a list of objects that are involved in the Applyupdate process. I need New, Updated and Deleted objects to insert in the Batch cycle.
How I can obtain those lists? There is a way with the TSqlRecord  or I must write my own lists?
Thanks in advance!
Sorry for my english... :-)

Stefano

Offline

#2 2016-10-28 19:29:59

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,242
Website

Re: ORM and ApplyUpdates

Which kind of TDataSet are you using?
This is in it that the object <-> fields mapping is done.

Offline

#3 2016-10-29 09:45:12

Stemon63
Member
Registered: 2016-10-24
Posts: 49

Re: ORM and ApplyUpdates

Hi,
I use Firedac with Firebird as backend... but now I ask about only ORM (TSQLRecord) approach.
I need to Known if there is a way for acquire the client DELTA operations on a Objectlist of Tsqlrecord, so I can apply updates into backend  with batch operation (I like a lot your Mongodb direct implementation).
I want adopt Mormot for all new applications (very powerful and perfect for my needs) and I need to migrate to Tsqlrecord concept, so I can obtain the same result but only with ORM (also on the client) and without datasets, locally or remote (REST).
Thanks in advance for help!
Stefano

Offline

#4 2016-10-31 09:47:36

Stemon63
Member
Registered: 2016-10-24
Posts: 49

Re: ORM and ApplyUpdates

In few words,
there is a (native) way for known if a TsqlRecord is inserted, modified (or deleted) in an Objectlist (ORM &+ grid in live binding), before using a loop for manage all variation in db with Client.Add(Rec,true), or Client.Update(Rec,true), etc... ?
User must press "Save All" or "Cancel All"...
Thanks a lot,
Stefano

Offline

#5 2016-10-31 11:42:07

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,242
Website

Re: ORM and ApplyUpdates

It is a TDataSet feature, I guess, not an ORM feature.

Offline

#6 2016-10-31 13:00:36

Stemon63
Member
Registered: 2016-10-24
Posts: 49

Re: ORM and ApplyUpdates

Ok,
I will looking for Adapter properties and methods.
Thanks :-)
Stefano

Offline

Board footer

Powered by FluxBB