Skip to content

Instantly share code, notes, and snippets.

@kartikpandey2
Created May 15, 2019 19:59
Show Gist options
  • Save kartikpandey2/2a85228d0232c628d427a7da7462e286 to your computer and use it in GitHub Desktop.
Save kartikpandey2/2a85228d0232c628d427a7da7462e286 to your computer and use it in GitHub Desktop.
// 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