CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • basic ERD stuff re: civicrm_line_item
Pages: [1]

Author Topic: basic ERD stuff re: civicrm_line_item  (Read 674 times)

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
basic ERD stuff re: civicrm_line_item
March 18, 2010, 03:59:02 pm
The ERD documentation is at 2.0, and I'm trying to make sense of some stuff wrt 3.0 tables for contributions. I'm confused because the following query yields many rows, instead of 0 rows as I would have guessed:

Code: [Select]
select * from civicrm_line_item where entity_table='civicrm_contribution' and entity_id not in (select id from civicrm_contribution);

What is the civicrm_line_item.entity_id an FK to when entity_table='civicrm_contribution'?

The data is in a production db that has one event with a complex price set.
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
Bug re: civicrm_line_item not being deleted
March 19, 2010, 08:41:11 am
This is a bug caused by deletions of contributions not deleting line items - filed as http://issues.civicrm.org/jira/browse/CRM-5979
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • basic ERD stuff re: civicrm_line_item

This forum was archived on 2017-11-26.