You are not logged in.
Pages: 1
Hi Ab,
For a rather big project, I have switched towards using DDD.
This project also wants to store documents, spreadsheets and photos into the [DDD] database.
However, DDD does not allow for TSQLRawBlob to be stored.
Cause (inside mORMotDDD):
soInsert: ndx := fBatch.Add(fCurrentORMInstance,true,fFactory.fAggregateID<>nil);
I would like to propose to add an option to allow for this:
soInsert: ndx := fBatch.Add(fCurrentORMInstance,true,fFactory.fAggregateID<>nil,ALL_FIELDS);
AFAIK, at this moment, TSQLRawBlob cannot be reached or handled by DDD.
I guess it cannot do harm to enable all fields for DDD.
Its the choice of the user (and me) to use TSQLRawBlob , for good reasons I hope ... ;-)
Offline
Please check https://synopse.info/fossil/info/55e1a121b6
Note that inserting BLOBs into the Batch won't be very efficient, since data will be Base-64 serialized in the Batch JSON.
We don't usually use this DDD command set for Blob processing, but access directly the database using efficient BLOB methods.
Offline
From my practice storing documents in BLOB can cause some troubles. I wrote article about my experience with storing files (original content is in Russian, hope google translate without mistakes)
Offline
Thanks for this quick fix !
FYI, I will not use batch-transfer for Blobs. The document database is a separate database, synchronized by using RemoteDataCreate.
However, the same business logic is used to access both databases. That is the reason this was a needed feature in this business case.
Offline
@mpv
I agree. That is why the data is being split between the two databases with separate servers.
I have no other choice but to store documents inside the separate database. It must be transportable and local.
Offline
Pages: 1