on
Italy
- Get link
- X
- Other Apps
| Table of Contents: 1. Introduction to sample application (MongoShop Product Catalog) 2. MongoDB schema design and data preparation 3. JSF (PrimeFaces) and Spring data MongoDB Integration 4. Enquriy data with spring data repository and mongotemplate 5. Create, Edit and delete data |
x= {
sku: "1000001",
type: "Audio Album",
title: "A Love Supreme",
description: "by John Coltrane",
publisher: "Sony Music",
pricing: {
list: 1200,
retail: 1100
},
details: {
title: "A Love Supreme [Original Recording Reissued]",
artist: "John Coltrane",
genre: "Jazz" ,
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"
],
}
}
y= {
sku: "1000002",
type: "Audio Album",
title: "Love Song",
description: "by Khali Fong",
publisher: "Sony Music",
pricing: {
list: 1000,
retail: 1200
},
details: {
title: "Long Song [Original Recording Reissued]",
artist: "Khali Fong",
genre: "R&B",
tracks: [
"Love Song",
"Spring Wind Blow",
"Red Bean",
"SingAlongSong"
],
}
}
z= {
sku: "1000003",
type: "Book",
title: "Node.js for PHP Developers",
description: "by Owen Peter",
publisher: "OReilly Media",
pricing: {
list: 2500,
retail: 2100
},
details: {
title: "Node.js for PHP Developers",
author: "Mark Owen",
genre: "Technology",
chapters: [
"Introduction to Node",
"Server-side JS",
"PHP API",
"Example"
],
}
}
db.product.save(x); db.product.save(y); db.product.save(z);
db.product.find({'sku':'1000004'});
db.product.find({'type':'Audio Album'});
db.product.find({'type':'Audio Album', 'details.genre': 'Jazz'});
Comments
Post a Comment