mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-20 01:03:23 +03:00
4fe417bcab
refs https://github.com/TryGhost/Team/issues/586 We have to use `belongsToMany` because of the way bookshelf relations work. In reality the relationship is 'hasMany', e.g. a Product has many Stripe Prices. These relations are the minimal needed to satisfy the following relationships without transforming the results. (e.g. flattening the StripePrices from a list of StripeProducts for a Product) Product -> StripeProduct: product.related('stripeProducts') StripeProduct -> StripePrice: stripeProduct.related('stripePrices'); Product -> StripePrice: product.related('stripePrices'); StripePrice -> Product: stripePrice.related('stripeProduct.product'); |
||
---|---|---|
.. | ||
client@cb58a98350 | ||
frontend | ||
server | ||
shared | ||
app.js | ||
boot.js |