[Voyage] How to declare an instance variable as transient?
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 Public Key: http://bit.ly/29z9fG0 #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV http://www.codeandmusic.com http://www.twitter.com/sergio_101 http://www.facebook.com/sergio101
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 <sergio.rrd@gmail.com> 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
Public Key: http://bit.ly/29z9fG0 <http://bit.ly/29z9fG0> #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV http://www.codeandmusic.com <http://www.codeandmusic.com/> http://www.twitter.com/sergio_101 <http://www.twitter.com/sergio_101> http://www.facebook.com/sergio101 <http://www.facebook.com/sergio101>
ah! thanks! On May 3, 2018 at 5:06:18 PM, Alejandro Infante (alejandroinfante91@gmail.com) 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 <sergio.rrd@gmail.com> 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 Public Key: http://bit.ly/29z9fG0 #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV http://www.codeandmusic.com http://www.twitter.com/sergio_101 http://www.facebook.com/sergio101 ---- peace, sergio photographer, journalist, visionary Public Key: http://bit.ly/29z9fG0 #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV http://www.codeandmusic.com http://www.twitter.com/sergio_101 http://www.facebook.com/sergio101
participants (2)
-
Alejandro Infante -
sergio ruiz