mongodb - Doctrine2 ODM - Object ( or Embedded Document ) as _id -


i have process running incremental map reduce collection looking @ metrics on different time periods - grouping id(s) , date. output collection has composite id handle grouping.

{     "_id" : {         "site" : 67,         "dt" : isodate("2012-07-03t00:00:00z")     },     "value" : {         // metrics here     } } 

i want able fetch results collection in symfony2 app using odm - having trouble _id field. thought might able specify @id , @embedone:

   /**     * @mongodb\id     * @mongodb\embedone(targetdocument="reportid")     */    protected $id; 

however, doesn't work. tried setting @id strategy=none, , can use querybuilder fetch rows, errors when trying hydrate document class. tried slugging site id , date ( 67-134137916 ) , allows me use documentmanager, lose ability query date ranges.

anyone have input on how handle object id in doctrine2's odm, supported?

edit: removed composite primary key tag - question pertains using object primary key.

i'm not sure if gets @ heart of question: composite primary keys tutorial

it looks can have composite primary keys of integers , strings (so no dates?).


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -