[Voyage] How to declare an instance variable as transient?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Voyage] How to declare an instance variable as transient?

sergio_101
Hi, all..

I have an instance variable that I don’t want to save as part of the full project. I was wondering how to set this up.

The documentation says:

Lastly, attributes can be excluded from storage (and hence retrieval) by re- turning a VOMongoTransientDescription instance as the attribute descrip- tor.

But I am not sure how to set this up in my class.

thanks! 


----
peace,
sergio
photographer, journalist, visionary


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Voyage] How to declare an instance variable as transient?

Alejandro Infante
Hi Sergio,

You have to add a method to the class side with a pragma. In my case, I wanted to set the instance variable “questionReferences” to transient.

myClass class>>mongoQuestionReferences
<mongoDescription>
^VOTransientDescription new
attributeName: 'questionReferences';
yourself

Cheers!
Alejandro

On Apr 30, 2018, at 3:21 PM, sergio ruiz <[hidden email]> wrote:

Hi, all..

I have an instance variable that I don’t want to save as part of the full project. I was wondering how to set this up.

The documentation says:

Lastly, attributes can be excluded from storage (and hence retrieval) by re- turning a VOMongoTransientDescription instance as the attribute descrip- tor.

But I am not sure how to set this up in my class.

thanks! 


----
peace,
sergio
photographer, journalist, visionary


Reply | Threaded
Open this post in threaded view
|

Re: [Voyage] How to declare an instance variable as transient?

sergio_101
ah! thanks!


On May 3, 2018 at 5:06:18 PM, Alejandro Infante ([hidden email]) wrote:

Hi Sergio,

You have to add a method to the class side with a pragma. In my case, I wanted to set the instance variable “questionReferences” to transient.

myClass class>>mongoQuestionReferences
<mongoDescription>
^VOTransientDescription new
attributeName: 'questionReferences';
yourself

Cheers!
Alejandro

On Apr 30, 2018, at 3:21 PM, sergio ruiz <[hidden email]> wrote:

Hi, all..

I have an instance variable that I don’t want to save as part of the full project. I was wondering how to set this up.

The documentation says:

Lastly, attributes can be excluded from storage (and hence retrieval) by re- turning a VOMongoTransientDescription instance as the attribute descrip- tor.

But I am not sure how to set this up in my class.

thanks! 


----
peace,
sergio
photographer, journalist, visionary


----
peace,
sergio
photographer, journalist, visionary


signature.asc (849 bytes) Download Attachment