具有属性的产品的Doctrine ODM(Mongo DB)文档结构

时间:2014-07-23 19:39:58

标签: php mongodb doctrine-orm doctrine-odm

如何在Doctrine ODM中为具有自定义属性的产品描述文档? 我在http://www.doctrine-project.org/2010/07/22/mongodb-for-ecommerce.html找到了一些详细信息,但它没用:(

{
  sku: "00e8da9b",
  type: "Audio Album",
  title: "A Love Supreme",
  description: "by John Coltrane",
  asin: "B0000A118M",

  shipping: {
    weight: 6,
    dimensions: {
      width: 10,
      height: 10,
      depth: 1
    },
  },

  pricing: {
    list: 1200,
    retail: 1100,
    savings: 100,
    pct_savings: 8
  },

  details: {
    title: "A Love Supreme [Original Recording Reissued]",
    artist: "John Coltrane",
    genre: [ "Jazz", "General" ],
    ...
    tracks: [
      "A Love Supreme Part I: Acknowledgement",
      "A Love Supreme Part II - Resolution",
      "A Love Supreme, Part III: Pursuance",
      "A Love Supreme, Part IV-Psalm"
    ],
  },
}

0 个答案:

没有答案