Doctrine2 mongodb and Timestamp -


I use principle 2 to write mongodb and one unit looks like this:

 

I do not know how to do this. Any help would be appreciated.

for beginners In the ODM you actually see the type using BSN type, they are respectively @Timestamp and the @Date subset of annotations The industry. In the PHP driver, the relevant driver class are respectively and respectively.

The BSN document is provided as the link above, the timestamp is intended for internal use (MongodiB uses it in a replication opplog) if you are accumulating the dates and time in your application The date time you should definitely use.

Seeing the example in the documentation of the ODM, it is unfortunate that for example, it has been created in the $ field, we use less encouraging field names and add a note that the user You probably do not want to map any fields as @Timestamp .

If you have field maps such as @ date , you should be able to use Query Builder, as you would any other field and operator (with a date value Relevant). When preparing for the query, the final value will match the query value related to the date-mapped field. This means that the value can be an integer timestamp, datetime, or mangodet example. A string is also appropriate, provided it is strtotime () .


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -