Merge pull request #23047 from civicrm/5.48
[civicrm-core.git] / Civi / Api4 / EntityFinancialTrxn.php
index dd553cd3e132c0c34cc79e309a13a3ef392c7e2c..ba4cdb89a44ecc846444c39e5a6187d490e8b5fa 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC. All rights reserved.                        |
@@ -9,13 +8,6 @@
  | and copyright information, see https://civicrm.org/licensing       |
  +--------------------------------------------------------------------+
  */
-
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC https://civicrm.org/licensing
- */
-
 namespace Civi\Api4;
 
 /**
@@ -30,7 +22,7 @@ namespace Civi\Api4;
  */
 class EntityFinancialTrxn extends Generic\DAOEntity {
   use Generic\Traits\EntityBridge;
-  use Generic\Traits\ReadOnly;
+  use Generic\Traits\ReadOnlyEntity;
 
   /**
    * @return array
@@ -38,8 +30,8 @@ class EntityFinancialTrxn extends Generic\DAOEntity {
   public static function getInfo() {
     $info = parent::getInfo();
     $info['bridge'] = [
-      'entity_id' => [],
-      'financial_trxn_id' => [],
+      'entity_id' => ['to' => 'financial_trxn_id'],
+      'financial_trxn_id' => ['to' => 'entity_id'],
     ];
     return $info;
   }