how to add string type to embeddedsMany

25 views
Skip to first unread message

falls huang

unread,
Nov 17, 2011, 9:30:16 PM11/17/11
to Mandango Users

This's my fakecode :


'embeddedsMany' => array(
'Message' => array( 'class' => 'string' ),
),

I want to embed string into array , but it's seemed that mandango
doesn't support it .

how can I get it?

Pablo Díez

unread,
Nov 18, 2011, 3:25:48 AM11/18/11
to mandang...@googlegroups.com
You have to embed Mandango documents instead of strings in the embeddedsMany.

You can also have a look at the raw and serialize field types.

Pablo
--
Pablo Díez | @pablodip
Mandango Lead Developer
http://mandango.org

catasoft

unread,
Jun 28, 2012, 7:13:17 AM6/28/12
to mandang...@googlegroups.com
Pablo, you say "have a loot at"... is there any documentation regarding these field types?
I need the same: an array of strings embedded inside a field, but I can't figure out how to generate the indexes 0,1,2..., cause it seems like the only way to do it is giving a specific name to fields... 
For instance, how would you model:
[types] => Array (
                [0] => locality
                [1] => political
                ...
            )
Thanks

Ahmed Nasser

unread,
Jun 28, 2012, 7:16:29 AM6/28/12
to mandang...@googlegroups.com
When I faced this problem I used the Raw type to work around it and represent arrays of strings. Not sure if there's a better handling.

catasoft

unread,
Jun 28, 2012, 7:36:53 AM6/28/12
to mandang...@googlegroups.com
Yep, that did it. Thanks ;)
Reply all
Reply to author
Forward
0 new messages