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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Making relationship names not unique
Pages: [1]

Author Topic: Making relationship names not unique  (Read 999 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Making relationship names not unique
March 01, 2009, 04:16:24 am
Hi,

If I create a relationship "member" between Individual and Org, and can't create a "member" between Household and Org, even so "in real life" it happens.

Is there a technical reason why it isn't possible or an option I missed ?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Making relationship names not unique
March 01, 2009, 07:05:07 am

i tried creating a relationship type between Houshold and Org and it worked for me

can u reproduce on the demo machine

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Making relationship names not unique
March 01, 2009, 02:11:53 pm
The schema for civicrm_relationship_type does specify that the "name" columns (name_a_b and name_b_a) are UNIQUE indexes. The rationale is that when relationships are created, the user first picks a relationship type (by selecting from a list of "names"). If the names aren't unique - then they would have difficulty deciding which to pick.

Applying unique names that specify the "usage" seems like a decent "workaround":

"Individual Member"
"Household Member"
Protect your investment in CiviCRM by  becoming a Member!

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Making relationship names not unique
March 01, 2009, 02:59:33 pm
Ok, make sense, and I'm going to work around as you suggest.

Thanks.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Making relationship names not unique

This forum was archived on 2017-11-26.