Data Pump

Hi there!

Is there any utility or class already created on Aurelius that I can pump data, copy from one database to another?

I foresee in  my tests here that will probably change the database soon, due to speed and other issues. But I have already started data entry.

The structure of both databases are identical.



There is no such utility, unfortunately.

Well, in that case I need to do that by myself, I will need to export the data to a text format.

I know I could directly write to the other database, but in this case I will have export and import done for text file, so I export than import after.

However when importing how can I override the GUID generation on the IDs when saving the objects? 


You would have to do a different mapping do tell Aurelius that you don't want a GUID generator, but an assigned one instead.

Segue um exemplo (não-oficial, sujeito a mudanças!) de fazer isso dinamicamente, basta alterar o mapeamento de um TMappingExplorer já existente:

    ExplorerCache := TMappingExplorer.Create(MapCache);
    ExplorerCache.GetId(TMinhaClasse).IdGenerator := TIdGenerator.None;