Which mapping type to choose for associative Arrays? Doctrine ODM -
i have simple question (by way great!) doctrine odm.
assume have document like:
/** * @document */ class test { /** @id */ public $id; /** @whichtype */ public $field = array(); }
now want store associative array like
array("test" => "test1", "anothertest" => "test2", ......);
in $field property of class.
no problem mongodb, know, in doctrine when use example @collection or @field, values stored (array_values being used in mapping driver collection example). stored value looks like
array("test1", "test2", ....)
does know doctrine-odm mapping type should use in order preserve key-value pairs in database?
thank in advance,
andi (greetz germany)
it should hash type:
Comments
Post a Comment