[Voyage] Possible to save an OrderedCollection?
For some reason, I am not able to do this: Object subclass: #TestBox instanceVariableNames: 'origin corner pointList' classVariableNames: '' poolDictionaries: '' category: 'PrintBot-Modelsâ! initialize pointList := OrderedCollection new. If i do something like below, I donât see the list of points ever show up in mongo.. Ideas? b := TestBox new. b save. p1 := Point x:0 y:0. p1 save. p2 := Point x:12 y:343. p2 save. b origin: p1. b corner: p2. b save. b pointList add: p1. b save. b pointList add: p2. b save. ---- 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, what you need to save is the persistent object, the one marked as âisVoyageRootâ in class side. cheers, Esteban
On 27 Apr 2018, at 14:44, sergio ruiz <sergio.rrd@gmail.com> wrote:
For some reason, I am not able to do this:
Object subclass: #TestBox instanceVariableNames: 'origin corner pointList' classVariableNames: '' poolDictionaries: '' category: 'PrintBot-Modelsâ!
initialize pointList := OrderedCollection new.
If i do something like below, I donât see the list of points ever show up in mongo..
Ideas?
b := TestBox new. b save. p1 := Point x:0 y:0. p1 save. p2 := Point x:12 y:343. p2 save.
b origin: p1. b corner: p2.
b save.
b pointList add: p1. b save. b pointList add: p2. b save.
---- 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>
Hi, esteban.. In this case, the persisted object is TestBox.. it does show up just fine in Mongo, but the OrderedCollection of points does not. On April 27, 2018 at 8:57:26 AM, Esteban Lorenzano (estebanlm@gmail.com) wrote: what you need to save is the persistent object, the one marked as âisVoyageRootâ in class side. ---- 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
On 27 Apr 2018, at 15:30, sergio ruiz <sergio.rrd@gmail.com> wrote:
Hi, esteban..
In this case, the persisted object is TestBox..
it does show up just fine in Mongo, but the OrderedCollection of points does not.
did you add the property after doing some tests? in that case, you need to reset Voyage caché. usually, VORepository current flush will do it Esteban
On April 27, 2018 at 8:57:26 AM, Esteban Lorenzano (estebanlm@gmail.com <mailto:estebanlm@gmail.com>) wrote:
what you need to save is the persistent object, the one marked as âisVoyageRootâ in class side.
---- 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.. ok. this did it.. So, this works, meaning that the production code i have in place is the problem.. I must have a loop somewhere.. I canât find it for the life of me.. On April 27, 2018 at 4:10:53 PM, Esteban Lorenzano (estebanlm@gmail.com) wrote: did you add the property after doing some tests? in that case, you need to reset Voyage caché. ---- 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)
-
Esteban Lorenzano -
sergio ruiz