Relationship between Opportunity, OpportunityLineItems(Opportunity Product), PricebookEntry, Product2 & Pricebookentry in Salesforce?

Both points are correct, see here ERD: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_erd_products.htm

enter image description here


Opportunity Product is a Junction Object between Opportunity and Product2 objects. The API name is OpportunityLineItem.

The relationship between Product2 and PriceBookEntry is 1:M(Master Detail) with PriceBookEntry on the child side.

The relationship between PriceBook2 and PriceBookEntry is 1:M(Master Detail) with PriceBookEntry on the child side.

So PriceBookEntry is a Junction object between Product2 and PriceBook2