[Glass] How to make one attribute of a persistent instance transient !??!?

Richard Sargent richard.sargent at gemtalksystems.com
Thu Mar 25 08:41:36 PDT 2021


On Wed, Mar 24, 2021, 23:37 Marten Feldtmann via Glass <
glass at lists.gemtalksystems.com> wrote:

> Is this possible ? I would like to define an attribute within instances of
> persistant classes, which is transient ... it should always be initialized
> with nil (on transaction boundaries).
>

We have a feature request for this but it's not available yet. No ETA.

We do have a #dbTransient option on a class, which means its instances
persist but only with nils in the instance variables. (Kind of weird, I
know.) This allows you to create a value holder whose value(s) will never
persist.


One of our customers has a convention technique whereby they use e.g.
#ourCommit rather than #commitTransaction and their convention allows them
to enumerate the objects that will be written and "pre-flush" each. This
allows classes to nil instance variables that they don't want persisted.


>
> Marten
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> https://lists.gemtalksystems.com/mailman/listinfo/glass
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gemtalksystems.com/mailman/private/glass/attachments/20210325/b8989fa7/attachment.htm>


More information about the Glass mailing list