Sergio, If you are keeping data in a Pharo image then you could just save the image instead of using STON. Alternatively, you could model your data in an Application class with three instance variables: theaters, movies, and events. Then you could dump the root application object and STON should preserve the relationships (I expect). I prefer this model since it allows me to create a test object that encapsulates all the data in one place (even if it is referenced from a class variable).
For GemStone, execute `SystemRepository fullBackupGzCompressedTo: aFilePath` (see details at https://downloads.gemtalksystems.com/docs/GemStone64/3.7.x/GS64-SysAdminGuide-3.7/11-BackupAndRestore.htm). This does a full object dump and preserves the relationship between objects. Note that GemStone also creates a transaction log so once a transaction commits, you can restore it in event of a system crash. James Foster > On Jan 17, 2024, at 8:48 PM, sergio ruiz <sergio....@gmail.com> wrote: > > I have been in the relational database world for decades. One of the things > that is super simple is backing up and restoring data. > > Sometimes, it makes it makes sense to pull the production data into > development. In the case of a catastrophe, it’s super simple to restore data > from a backup. > > I am thinking of backup strategies for my data once again, and am wondering > if things have changed since I was last using smalltalk. > > I am thinking of the following: > > STON > I could dump all of my data into STON, but there is one slight twist. In this > project, it’s just making a list of movie listings. There are three basic > classes: Theater, Movie, Event. Each of these classes stores an > OrderedCollection of items of that type on a class variable, as I’ll need to > access each on their own.. so, if an event has a theater, I’ll need to access > Theaters on their own, and Movies on their own. > > So, I would have to rebuild the list of Theaters from the Theaters in each > event. Otherwise, I would lose the link between the Theaters on the Theater > class variable and the Theater in the Event instance. > > Am I thinking about this incorrectly? > > Gemstones > I am totally into the idea of using gemstones. Is there a backup and restore > for objects here? do the relationships remain? > > Voyage > This seems like a good solution, but I would rather stay in the smalltalk > object store. > > Ideas? > > Thanks! > > ---- > peace, > sergio > photographer, journalist, visionary > > Public Key: > https://pgp.key-server.io/pks/lookup?op=get&search=0x69B08F58923AB3A2 > #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV > @sergio_101@mastodon.social > https://sergio101.com > http://www.codeandmusic.com > http://www.twitter.com/sergio_101 > http://www.facebook.com/sergio101 >