Define a tagged value on the attribute (not the class), named transient
with value true
.
This works in 9.1; unfortunately I don't have an 8.0 installation to try this on. You can check it yourself by looking at the relevant generation template: select Settings - Code Generation Templates, then pick Java in the language drop-down (top left). In the Templates list, find the one called "Attribute Declaration."
If there is a line starting with %attTag:"transient"
, the above should work. If not, you can add it yourself if you know how (code generation templates are not a good area for experimentation), but I don't want to post Sparx-copyrighted material here.
Sadly, using tagged values on attributes means you can't see this property in diagrams or the project browser. That's just a fact of life, but it might be worth the bother to hassle Sparx about putting in some sort of way of showing attribute tags.