About list of properties

1 view
Skip to first unread message

Andre Luis - Shift

unread,
Oct 12, 2009, 2:43:31 PM10/12/09
to InterSystems: MV Community
Hi all,

I have a problem when I need to use list of properties that referenced
other class.
See the bellow example which I would like to show my problem:
Class A {
MVFILENAME=”testea”
Property b As List of B
}
Class B {
MVFILENAME=”testeb”
Property Id As %Integer;
Property c As %String;
}
The problem happens when I need to save information in the class A.
When I insert the object in the property b of the class A and I save
it everything work right. But when I access the MV and I edit the
MVFILENAME of the class A, I note that cache insert two dots before
the data. See the example:
Ed testea 1
..1]..2
Observe the dots “..” before the data. Why this happens?

Dawn Wolthuis

unread,
Oct 12, 2009, 3:00:42 PM10/12/09
to InterSy...@googlegroups.com
I have not had that problem, but did encounter enough issues with "As
list of <reference>" that we now only have reference types like this
on single-valued properties. That doesn't help get an answer to your
question, but adds to it in case someone can clue us in if these are
known to work for others. I think I recall some work was done in this
area, so it might help to indicate what release you are running. We
upgraded to 2009.1 and I have not tried them since that time.

--dawn
--
Dawn M. Wolthuis

Take and give some delight today

Andre Luis - Shift

unread,
Oct 14, 2009, 1:41:36 PM10/14/09
to InterSystems: MV Community
I am using the release 2009.1 build 423.
When I use prperties types on single value, I don't have problem as
well.
Moreover, problem like that only happens when I save the class. When I
insert through MV I don't have problem. As I have cases which I insert
data using MV and class (where I use the save command), I would like
to know if there is a solution, because, if there isn't a solution I
will use properties types like list of %String.


Thanks.
> Take and give some delight today- Ocultar texto das mensagens anteriores -
>
> - Mostrar texto das mensagens anteriores -

dawn

unread,
Oct 17, 2009, 1:51:53 PM10/17/09
to InterSystems: MV Community
FWIW, I did end up switching all of mine to list of %String and we,
too, are using %Save().

I'm wondering what happened to the InterSystems readers on this list,
particularly Ed who usually answers with both speed and accuracy.
Anybody home?
--dawn

Ed Clark

unread,
Oct 17, 2009, 3:03:19 PM10/17/09
to InterSy...@googlegroups.com
It looks like maybe my responses aren't getting to the list? I've made
several recently but they aren't there when I look at the group on
groups.google.com. Lets see if this one makes it....

When you have a list of object, the objects that you store into the list
(even if it's just the object ids) need to be "serialized". Cache pretty
much always serializes objects by converting then into a $LIST
structure. So the dots that you see in ED are not dots, but ED's
representation of unprintable binary characters that make up the $LIST
structure. You nee to use the $LIST() function and related functions to
manipulate a $LIST string.

It doesn't matter that the your class uses MV storage. Objects can be
arbitrarily complex, so need to be serialized by default as nested
$LISTs. This will probably play havoc eventually with your data, because
a $LIST is a binary structure, which could possible contain characters
that mv uses for delimiters.

Dawn Wolthuis

unread,
Oct 17, 2009, 3:11:50 PM10/17/09
to InterSy...@googlegroups.com
I received this one, Ed. Thanks. --dawn

André

unread,
Oct 18, 2009, 3:27:35 PM10/18/09
to InterSy...@googlegroups.com
Ok, so I will use list of %String.
Thanks.

2009/10/17 Dawn Wolthuis <dawnwo...@gmail.com>
Reply all
Reply to author
Forward
0 new messages