4

I've realized that there are two tables with similar names in my DB: field_data_commerce_line_items and commerce_line_item.

Can someone explain the purpose or reason of having them? I mean the difference between them.

My understanding is that field_data_commerce_line_items is a reference field on an order that references a line in the commerce_line_item table on field_data_commerce_line_items.commerce_line_items_line_item_id = commerce_line_item.line_item_id.

However still not getting the overall picture.

Fky
  • 2,133
  • 1
  • 15
  • 23
user3563097
  • 179
  • 8

1 Answers1

0

In Drupal an entity can reference multiple entities via a field reference. The references aren't necessarily unique, but the entities are.

field_data_commerce_line_items is a multi-value field reference that associates Line Item entities to a specific Order.

commerce_line_item represents the unique Line Item entity.

firewaller
  • 426
  • 2
  • 8