-
I have had a look at the legacy mapping. Currently trying out a few things, including renaming my class "Customer" -> "Customers" Since this case is not handled automatically (correct?), I would like to test the variant with the "refactorings.csv" as described at https://docs.eclipsestore.io/manual/storage/legacy-type-mapping/index.html Small note: The "old" or "current" is only intended here for clarification - perhaps it should be mentioned that it does not belong in the file but only the actual mapping data.
My own file now looks like this:
Nevertheless, I still get the following "mapping" error:
The parser for the .csv can certainly handle a lot of options (separators etc.). I have already tried a , and a ; but none of them work:
Calling up or reading the file itself works via :
I also have other issues, but I would report them separately (if I don't get it right), e.g. there seems to be no automatic type change from
Here I assume you have to intervene via the explicit mechanism? And if you remove a field, the data is not deleted (as with a drop of a column of a relational DB table), but it seems to behave more like a VIEW where the column has been removed / excluded? If I have understood the concept correctly, the data in the store (physically) is not "touched / changed" by the evolution of the data model, but everything is resolved / regulated "on-the-fly" via the entries in the PersistenceTypeDictionary.ptd ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello, Regarding the refactorings.csv file format: There is no automatic conversion from String objects to primitive integer values. The LegacyTypeMapping does not modify the persisted data. The mapping is done during object re-creation in memory. If such a mapped object is stored again it will be written in its new version. The obsolete old version will be removed by the storage garbage collector someday. |
Beta Was this translation helpful? Give feedback.
Hello,
Regarding the refactorings.csv file format:
The headline “old current” is required. As separator you should use a single tabulator.
There is no automatic conversion from String objects to primitive integer values.
This must be done by a custom
BinaryValueSetter
.The LegacyTypeMapping does not modify the persisted data. The mapping is done during object re-creation in memory. If such a mapped object is stored again it will be written in its new version. The obsolete old version will be removed by the storage garbage collector someday.
The PersistenceTypeDictionary is essential for that as it describes the layout of all persisted types.