#1 Re: mORMot 1 » Infra Sample » 2016-02-16 17:54:39

Must be something related to DDD (tools..., maybe)

#2 Re: mORMot 1 » DDD and many-to-many or one-to-many relationships » 2016-01-26 17:48:24

Ok, Integrity could be safely managed at business logic level.

"But be aware that you would loose one of the idea/benefit of DDD, which is persistence ignorance, as detailed in the doc.
IMHO such persistence agnosticism is awesome, and worth it."

But when you need to give maintenance (directly in the database) in fields Blob/Text? For example, it found that the field "X", all the details of sales for a particular month are wrong. I have to pass the field value "X" from "A" to "B".

Como processar tal atualização em um banco NoSql como MongoDB?

#3 Re: mORMot 1 » DDD and many-to-many or one-to-many relationships » 2016-01-26 15:44:23

I agree, "Everything you need should be within the Aggregate."

But "You read the aggregate, update the details, then write the aggregate back.", does not apply to a DBA for example, working directly with SQL database / RDBMS without having any contact with the application, nor with the business rules (corrective maintenance data level of a database).

The scenario where you would like to apply DDD, would be an ERP, where a SQL / RDBMS in my point of view would be indispensable, precisely because many changes are not the responsibility of application.

The fact that a SQL / RDBMS indispensable requirement for the project, it would be a limitation for DDD mORMot?

I have a way to keep everything I need within the Aggregate and store in separate tables in the database?

#4 Re: mORMot 1 » DDD and many-to-many or one-to-many relationships » 2016-01-26 14:15:24

Thanks for the help, but I still have doubts ...

Imagine the following case:

TDetail = class(TSynPersistent)
private
  FField1: RawUTF8;
  FField2: RawUTF8;
published
  property Field1: RawUTF8 read FField1 write FField1;
  property Field2: RawUTF8 read FField2 write FField2;
end;

TDetailsObjArray = array of TDetail;

//Aggregate
TMaster = class(TSynAutoCreateFields)
private
  FMasterID: Integer;
  FDetails: TDetailsObjArray; 
published
  property MasterID: Integer read FMasterID write FMasterID;
  property Details: TDetailsObjArray read FDetails write FDetails; //Dynamic arrays will be stored as BLOB fields in the database
end;

How to perform some "update" the database level, type:

RDBMS, we would have:

update tb_detail set
  tb_detail.field1 = 'A'
where tb_detail.masterid=1

How to perform this "update" in a Blob field / Text?

How to perform this "update" in a NoSQL database?

#5 Re: mORMot 1 » DDD and many-to-many or one-to-many relationships » 2016-01-26 12:25:56

Hello,

anvar

Did you get any solution to your question?

Board footer

Powered by FluxBB