Skip to content

Commit

Permalink
Merge pull request #16703 from pradpnayak/priceSetSchema
Browse files Browse the repository at this point in the history
Added pseudoconstant for civicrm_tag.parent_id
  • Loading branch information
eileenmcnaughton authored Mar 9, 2020
2 parents 71223c5 + 29303df commit 77be447
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CRM/Core/BAO/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,8 @@ public static function add(&$params, $ids = []) {
);
}

CRM_Core_PseudoConstant::flush();

return $tag;
}

Expand Down
7 changes: 6 additions & 1 deletion CRM/Core/DAO/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Core/Tag.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:7267e5b21f5bc822a58ffffc23b6dec1)
* (GenCodeChecksum:18f8021635fed59be1eabc246f6b88cb)
*/

/**
Expand Down Expand Up @@ -182,6 +182,11 @@ public static function &fields() {
'bao' => 'CRM_Core_BAO_Tag',
'localizable' => 0,
'FKClassName' => 'CRM_Core_DAO_Tag',
'pseudoconstant' => [
'table' => 'civicrm_tag',
'keyColumn' => 'id',
'labelColumn' => 'name',
],
],
'is_selectable' => [
'name' => 'is_selectable',
Expand Down
5 changes: 5 additions & 0 deletions xml/schema/Core/Tag.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
<type>int unsigned</type>
<default>NULL</default>
<comment>Optional parent id for this tag.</comment>
<pseudoconstant>
<table>civicrm_tag</table>
<keyColumn>id</keyColumn>
<labelColumn>name</labelColumn>
</pseudoconstant>
<add>1.1</add>
</field>
<field>
Expand Down

0 comments on commit 77be447

Please sign in to comment.