[Voyage] Possible to save an OrderedCollection?

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

[Voyage] Possible to save an OrderedCollection?

sergio_101

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


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

Re: [Voyage] Possible to save an OrderedCollection?

EstebanLM
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 <[hidden email]> 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


Reply | Threaded
Open this post in threaded view
|

Re: [Voyage] Possible to save an OrderedCollection?

sergio_101
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 ([hidden email]) wrote:


what you need to save is the persistent object, the one marked as “isVoyageRoot” in class side.
----
peace,
sergio
photographer, journalist, visionary


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

Re: [Voyage] Possible to save an OrderedCollection?

EstebanLM


On 27 Apr 2018, at 15:30, sergio ruiz <[hidden email]> 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 ([hidden email]) wrote:


what you need to save is the persistent object, the one marked as “isVoyageRoot” in class side.
----
peace,
sergio
photographer, journalist, visionary


Reply | Threaded
Open this post in threaded view
|

Re: [Voyage] Possible to save an OrderedCollection?

sergio_101
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 ([hidden email]) wrote:

did you add the property after doing some tests? 
in that case, you need to reset Voyage caché.
----
peace,
sergio
photographer, journalist, visionary


signature.asc (849 bytes) Download Attachment