I'm trying to insert an array in my mongo collection like this
field:[tag1,tag2,tag3]
my mapping is
/**
* @MongoDB\Hash
*/
protected $field=array();
I'm inserting like this in PHP :
$message->setField([$idme,$to]);
While I want it stored as list, I get this format:
"field" : {
"0" : "533f28c9211b6f7e448b4567",
"1" : "52cb29b0211b6fd9248b456b"
}
How can I achieve my goal ?