You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Records that are pointed to by @ ManyToOne() relations but are in different repositories should be:
Recorded in the Repository Transaction History (keeping original Actor and Actor Record Ids, changing the Repository Id)
Created when the Repository is loaded
Updated (with different Repository Id) the referenced repository is loaded. Also the values need to be checked (by scanning for changes in the Repository transaction history) and updated where needed.
@ ManyToOne() references to these records should be updated.
This solves a number of issues:
It is possible that the referenced Repository is not accessible to some of the users of the referencing repository. In this case the queries that use @ ManyToOne() relations should still return full results. This is true especially if the query results are constrained by the records pointed to by the @ ManyToOne() relations.
Even if the referenced Repository is accessible the query results may not return full data (or any data) until the referenced Repository is loaded, thus causing lag.
NOTE: This will impact native Foreign Keys in the SqlJs table (currently they are not generated so not an issue).
The text was updated successfully, but these errors were encountered:
artem-v-shamsutdinov
changed the title
Copying and maintenance of referenced records across Repositories
Copying and maintaining of referenced records into referencing Repositories
Jan 6, 2023
The decision is to create "real" objects in the database while maintaining copies in serialized Transaction logs. Subsequently, when the repository of the copied object is loaded that object is instead Updated (and not Created) because it is already present in the database.
Records that are pointed to by @ ManyToOne() relations but are in different repositories should be:
This solves a number of issues:
NOTE: This will impact native Foreign Keys in the SqlJs table (currently they are not generated so not an issue).
The text was updated successfully, but these errors were encountered: