Created
May 15, 2019 19:59
-
-
Save kartikpandey2/2a85228d0232c628d427a7da7462e286 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I think we should create 2 entries for same product one in english and another in spanish | |
// For example: Product is IphoneX, | |
// Save one entry in english Language | |
{ | |
name: "IphoneX", | |
price: x, | |
lang: "en", | |
public_id: 123 | |
} | |
// Save another entry in spanish Language | |
{ | |
name: "IphoneX in spanish", | |
price: x, | |
lang: "es", | |
public_id: 123 | |
} | |
// By this we can easliy query data | |
// For eg if we need IphoneX in es launguage | |
findOne({public_id: 123, lang: es}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment