On 12 June 2012 17:20, Chris Muller ma.chris.m@gmail.com wrote:
Ah ok. Yes, there are actually two ways to do it.
- you can implement #maTransientVariables on any class to declare its
named inst-vars which should be ignored by Magma. Just answer an Array of the inst-var names (it can be calculated dynamically). This is the easiest solution to cause Magma to ignore particular object links.
- Your example was with Array though, which doesn't have named
inst-vars. For that you would have to use a MaImmutabilityStrategy which lets you specify objects to be immutable by a condition block. It can even ignore a reference based on conditions of the *Referencer* (e.g., the referencing object) instead of only the referenced object. See MagmaTestCase>>#commitWithImmutabilityStrategy for usage details.
OK, thanks. I knew about #maTransientVariables but haven't thought of using it this way.