diff --git a/config/Migrations/20241122070040_CreateExternalProductCatalogs.php b/config/Migrations/20241122070040_CreateExternalProductCatalogs.php
index 1382ee1..6af05d7 100644
--- a/config/Migrations/20241122070040_CreateExternalProductCatalogs.php
+++ b/config/Migrations/20241122070040_CreateExternalProductCatalogs.php
@@ -14,7 +14,11 @@ class CreateExternalProductCatalogs extends AbstractMigration
      */
     public function change(): void
     {
-        $table = $this->table('external_product_catalogs');
+        $table = $this->table('external_product_catalogs', ['id' => false, 'primary_key' => ['id']]);
+        $table->addColumn('id', 'uuid', [
+            'default' => null,
+            'null' => false,
+        ]);
         $table->addColumn('product_catalog_id', 'uuid', [
             'default' => null,
             'null' => false,
diff --git a/config/Migrations/20250331030759_CreateExternalProductCatalogsProductCatalogs.php b/config/Migrations/20250331030759_CreateExternalProductCatalogsProductCatalogs.php
index 4171250..90d6629 100644
--- a/config/Migrations/20250331030759_CreateExternalProductCatalogsProductCatalogs.php
+++ b/config/Migrations/20250331030759_CreateExternalProductCatalogsProductCatalogs.php
@@ -15,9 +15,8 @@ class CreateExternalProductCatalogsProductCatalogs extends BaseMigration
     public function change(): void
     {
         $table = $this->table('external_product_catalogs_product_catalogs');
-        $table->addColumn('external_product_catalog_id', 'string', [
+        $table->addColumn('external_product_catalog_id', 'uuid', [
             'default' => null,
-            'limit' => 255,
             'null' => false,
         ]);
         $table->addColumn('product_catalog_id', 'uuid', [
diff --git a/src/Model/Table/ExternalProductCatalogsProductCatalogsTable.php b/src/Model/Table/ExternalProductCatalogsProductCatalogsTable.php
index a6d3325..ae59ae8 100644
--- a/src/Model/Table/ExternalProductCatalogsProductCatalogsTable.php
+++ b/src/Model/Table/ExternalProductCatalogsProductCatalogsTable.php
@@ -56,11 +56,13 @@ class ExternalProductCatalogsProductCatalogsTable extends Table
         $this->addBehavior('Timestamp');
 
         $this->belongsTo('ExternalProductCatalogs', [
-            'foreignKey' => 'external_product_catalog_id',
+            'className' => 'CakeProducts.ExternalProductCatalogs',
+//            'foreignKey' => 'external_product_catalog_id',
             'joinType' => 'INNER',
         ]);
         $this->belongsTo('ProductCatalogs', [
-            'foreignKey' => 'product_catalog_id',
+            'className' => 'CakeProducts.ProductCatalogs',
+//            'foreignKey' => 'product_catalog_id',
             'joinType' => 'INNER',
         ]);
     }
@@ -74,8 +76,7 @@ class ExternalProductCatalogsProductCatalogsTable extends Table
     public function validationDefault(Validator $validator): Validator
     {
         $validator
-            ->scalar('external_product_catalog_id')
-            ->maxLength('external_product_catalog_id', 255)
+            ->uuid('external_product_catalog_id')
             ->notEmptyString('external_product_catalog_id');
 
         $validator
@@ -99,8 +100,8 @@ class ExternalProductCatalogsProductCatalogsTable extends Table
      */
     public function buildRules(RulesChecker $rules): RulesChecker
     {
-        $rules->add($rules->existsIn(['external_product_catalog_id'], 'ExternalProductCatalogs'), ['errorField' => 'external_product_catalog_id']);
-        $rules->add($rules->existsIn(['product_catalog_id'], 'ProductCatalogs'), ['errorField' => 'product_catalog_id']);
+//        $rules->add($rules->existsIn(['external_product_catalog_id'], 'ExternalProductCatalogs'), ['errorField' => 'external_product_catalog_id']);
+//        $rules->add($rules->existsIn(['product_catalog_id'], 'ProductCatalogs'), ['errorField' => 'product_catalog_id']);
 
         return $rules;
     }
diff --git a/src/Model/Table/ExternalProductCatalogsTable.php b/src/Model/Table/ExternalProductCatalogsTable.php
index d87ddd4..3e77e09 100644
--- a/src/Model/Table/ExternalProductCatalogsTable.php
+++ b/src/Model/Table/ExternalProductCatalogsTable.php
@@ -3,6 +3,7 @@ declare(strict_types=1);
 
 namespace CakeProducts\Model\Table;
 
+use Cake\Core\Configure;
 use Cake\Datasource\EntityInterface;
 use Cake\Datasource\ResultSetInterface;
 use Cake\ORM\Association\BelongsTo;
@@ -54,12 +55,17 @@ class ExternalProductCatalogsTable extends Table
 
         $this->addBehavior('Timestamp');
 
+        $this->setEntityClass(
+            Configure::read('CakeProducts.ExternalProductCatalogs.entity', 'CakeProducts\Model\Entity\ExternalProductCatalog')
+        );
+
         $this->belongsToMany('ProductCatalogs', [
-            'through' => 'CakeProducts.ExternalProductCatalogsProductCatalogs',
+            'through' => 'ExternalProductCatalogsProductCatalogs',
             'className' => 'CakeProducts.ProductCatalogs',
         ]);
 
         $this->hasMany('ExternalProductCatalogsProductCatalogs', [
+            'foreignKey' => 'external_product_catalog_id',
             'className' => 'CakeProducts.ExternalProductCatalogsProductCatalogs',
         ]);
     }
@@ -72,10 +78,6 @@ class ExternalProductCatalogsTable extends Table
      */
     public function validationDefault(Validator $validator): Validator
     {
-        $validator
-            ->uuid('product_catalog_id')
-            ->notEmptyString('product_catalog_id');
-
         $validator
             ->scalar('base_url')
             ->maxLength('base_url', 255)
@@ -106,8 +108,6 @@ class ExternalProductCatalogsTable extends Table
      */
     public function buildRules(RulesChecker $rules): RulesChecker
     {
-        $rules->add($rules->existsIn(['product_catalog_id'], 'ProductCatalogs'), ['errorField' => 'product_catalog_id']);
-
         return $rules;
     }
 }
diff --git a/src/Model/Table/ProductCatalogsTable.php b/src/Model/Table/ProductCatalogsTable.php
index bc2ed67..d59d863 100644
--- a/src/Model/Table/ProductCatalogsTable.php
+++ b/src/Model/Table/ProductCatalogsTable.php
@@ -54,7 +54,7 @@ class ProductCatalogsTable extends Table
             'className' => 'CakeProducts.ProductCategories',
         ]);
         $this->belongsToMany('ExternalProductCatalogs', [
-            'through' => 'CakeProducts.ExternalProductCatalogsProductCatalogs',
+            'through' => 'ExternalProductCatalogsProductCatalogs',
             'className' => 'CakeProducts.ExternalProductCatalogs',
         ]);
     }
diff --git a/tests/Fixture/ExternalProductCatalogsFixture.php b/tests/Fixture/ExternalProductCatalogsFixture.php
index 8b93827..b3ec1d7 100644
--- a/tests/Fixture/ExternalProductCatalogsFixture.php
+++ b/tests/Fixture/ExternalProductCatalogsFixture.php
@@ -19,13 +19,11 @@ class ExternalProductCatalogsFixture extends TestFixture
     {
         $this->records = [
             [
-                'id' => 1,
-                'product_catalog_id' => '115153f3-2f59-4234-8ff8-e1b205761428',
+                'id' => '115153f3-2f59-4234-8ff8-e1b205769999',
                 'base_url' => 'http://localhost:8766',
                 'api_url' => 'http://localhost:8766/api',
                 'created' => '2024-11-22 09:39:37',
                 'deleted' => '2024-11-22 09:39:37',
-                'enabled' => 1,
             ],
         ];
         parent::init();
diff --git a/tests/Fixture/ExternalProductCatalogsProductCatalogsFixture.php b/tests/Fixture/ExternalProductCatalogsProductCatalogsFixture.php
index 471cbc5..f13cd30 100644
--- a/tests/Fixture/ExternalProductCatalogsProductCatalogsFixture.php
+++ b/tests/Fixture/ExternalProductCatalogsProductCatalogsFixture.php
@@ -18,7 +18,12 @@ class ExternalProductCatalogsProductCatalogsFixture extends TestFixture
     public function init(): void
     {
         $this->records = [
-
+            [
+                'external_product_catalog_id' => '115153f3-2f59-4234-8ff8-e1b205769999',
+                'product_catalog_id' => '115153f3-2f59-4234-8ff8-e1b205761428',
+                'created' => '2024-11-22 09:39:37',
+                'enabled' => false,
+            ],
         ];
         parent::init();
     }
diff --git a/tests/TestCase/Controller/ExternalProductCatalogsControllerTest.php b/tests/TestCase/Controller/ExternalProductCatalogsControllerTest.php
index ea25fe1..fe5d450 100644
--- a/tests/TestCase/Controller/ExternalProductCatalogsControllerTest.php
+++ b/tests/TestCase/Controller/ExternalProductCatalogsControllerTest.php
@@ -32,6 +32,7 @@ class ExternalProductCatalogsControllerTest extends BaseControllerTest
      */
     protected array $fixtures = [
         'plugin.CakeProducts.ExternalProductCatalogs',
+        'plugin.CakeProducts.ExternalProductCatalogsProductCatalogs',
         'plugin.CakeProducts.ProductCatalogs',
     ];
 
@@ -96,7 +97,7 @@ class ExternalProductCatalogsControllerTest extends BaseControllerTest
     */
     public function testViewGet(): void
     {
-        $id = 1;
+        $id = '115153f3-2f59-4234-8ff8-e1b205769999';
         $this->loginUserByRole('admin');
         $url = [
             'plugin' => 'CakeProducts',
@@ -218,7 +219,7 @@ class ExternalProductCatalogsControllerTest extends BaseControllerTest
             'plugin' => 'CakeProducts',
             'controller' => 'ExternalProductCatalogs',
             'action' => 'edit',
-            1,
+            '115153f3-2f59-4234-8ff8-e1b205769999',
         ];
         $this->get($url);
         $this->assertResponseCode(200);
@@ -237,7 +238,7 @@ class ExternalProductCatalogsControllerTest extends BaseControllerTest
     public function testEditPutSuccess(): void
     {
         $this->loginUserByRole('admin');
-        $id = 1;
+        $id = '115153f3-2f59-4234-8ff8-e1b205769999';
         $before = $this->ExternalProductCatalogs->get($id);
         $url = [
             'plugin' => 'CakeProducts',
@@ -273,7 +274,7 @@ class ExternalProductCatalogsControllerTest extends BaseControllerTest
     public function testEditPutFailure(): void
     {
         $this->loginUserByRole('admin');
-        $id = 1;
+        $id = '115153f3-2f59-4234-8ff8-e1b205769999';
         $before = $this->ExternalProductCatalogs->get($id);
         $url = [
             'plugin' => 'CakeProducts',
@@ -313,7 +314,7 @@ class ExternalProductCatalogsControllerTest extends BaseControllerTest
             'plugin' => 'CakeProducts',
             'controller' => 'ExternalProductCatalogs',
             'action' => 'delete',
-            1,
+            '115153f3-2f59-4234-8ff8-e1b205769999',
         ];
         $this->delete($url);
         $this->assertResponseCode(302);
diff --git a/tests/TestCase/Controller/ExternalProductCatalogsProductCatalogsControllerTest.php b/tests/TestCase/Controller/ExternalProductCatalogsProductCatalogsControllerTest.php
index 10b78d5..f86c02d 100644
--- a/tests/TestCase/Controller/ExternalProductCatalogsProductCatalogsControllerTest.php
+++ b/tests/TestCase/Controller/ExternalProductCatalogsProductCatalogsControllerTest.php
@@ -110,7 +110,7 @@ class ExternalProductCatalogsProductCatalogsControllerTest extends BaseControlle
         ];
         $this->delete($url);
         $this->assertResponseCode(302);
-        $this->assertRedirectContains('externalproductcatalogsproductcatalogs');
+        $this->assertRedirectContains('external-product-catalogs');
 
         $cntAfter = $this->ExternalProductCatalogsProductCatalogs->find()->count();
         $this->assertEquals($cntBefore - 1, $cntAfter);
diff --git a/tests/TestCase/Model/Table/ExternalProductCatalogsTableTest.php b/tests/TestCase/Model/Table/ExternalProductCatalogsTableTest.php
index 168ae37..fbe4d2d 100644
--- a/tests/TestCase/Model/Table/ExternalProductCatalogsTableTest.php
+++ b/tests/TestCase/Model/Table/ExternalProductCatalogsTableTest.php
@@ -3,6 +3,7 @@ declare(strict_types=1);
 
 namespace CakeProducts\Test\TestCase\Model\Table;
 
+use Cake\ORM\Table;
 use Cake\TestSuite\TestCase;
 use CakeProducts\Model\Table\ExternalProductCatalogsTable;
 
@@ -14,7 +15,7 @@ class ExternalProductCatalogsTableTest extends TestCase
     /**
      * Test subject
      *
-     * @var \CakeProducts\Model\Table\ExternalProductCatalogsTable
+     * @var ExternalProductCatalogsTable
      */
     protected $ExternalProductCatalogs;
 
@@ -25,6 +26,7 @@ class ExternalProductCatalogsTableTest extends TestCase
      */
     protected array $fixtures = [
         'plugin.CakeProducts.ExternalProductCatalogs',
+        'plugin.CakeProducts.ExternalProductCatalogsProductCatalogs',
         'plugin.CakeProducts.ProductCatalogs',
     ];
 
@@ -56,13 +58,14 @@ class ExternalProductCatalogsTableTest extends TestCase
     * TestInitialize method
     *
     * @return void
-    * @uses \CakeProducts\Model\Table\ExternalProductCatalogsTable::initialize()
+    * @uses ExternalProductCatalogsTable::initialize
     */
     public function testInitialize(): void
     {
         // verify all associations loaded
         $expectedAssociations = [
             'ProductCatalogs',
+            'ExternalProductCatalogsProductCatalogs',
         ];
         $associations = $this->ExternalProductCatalogs->associations();
 
@@ -87,7 +90,7 @@ class ExternalProductCatalogsTableTest extends TestCase
     * Test validationDefault method
     *
     * @return void
-    * @uses \CakeProducts\Model\Table\ExternalProductCatalogsTable::validationDefault()
+    * @uses ExternalProductCatalogsTable::validationDefault
     */
     public function testValidationDefault(): void
     {
@@ -98,7 +101,7 @@ class ExternalProductCatalogsTableTest extends TestCase
     * Test buildRules method
     *
     * @return void
-    * @uses \CakeProducts\Model\Table\ExternalProductCatalogsTable::buildRules()
+    * @uses ExternalProductCatalogsTable::buildRules
     */
     public function testBuildRules(): void
     {
diff --git a/tests/TestCase/Model/Table/ProductCatalogsTableTest.php b/tests/TestCase/Model/Table/ProductCatalogsTableTest.php
index a74882a..8f4d893 100644
--- a/tests/TestCase/Model/Table/ProductCatalogsTableTest.php
+++ b/tests/TestCase/Model/Table/ProductCatalogsTableTest.php
@@ -26,6 +26,7 @@ class ProductCatalogsTableTest extends TestCase
      */
     protected array $fixtures = [
         'plugin.CakeProducts.ProductCatalogs',
+        'plugin.CakeProducts.ExternalProductCatalogsProductCatalogs',
         'plugin.CakeProducts.ProductCategories',
     ];