mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05: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'); |
||
---|---|---|
.. | ||
adapters | ||
api | ||
data | ||
lib | ||
models | ||
public | ||
services | ||
translations | ||
views | ||
web | ||
analytics-events.js | ||
ghost-server.js | ||
notify.js | ||
overrides.js | ||
update-check.js |