# Relations not visible

**URL:** https://community.forestadmin.com/t/relations-not-visible/6431
**Category:** Help me!
**Created:** [June 24, 2023, 6:52am UTC](https://community.forestadmin.com/t/relations-not-visible/6431 "2023-06-24T06:52:22Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![michaelbaron](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@michaelbaron](https://community.forestadmin.com/u/michaelbaron)
#### Post date: [June 24, 2023, 6:52am UTC](https://community.forestadmin.com/t/relations-not-visible/6431/1 "2023-06-24T06:52:22Z")

</div>

Hi,

## Feature(s) impacted

Relations

## Observed behavior

I have 3 SQL Tables

- `transactionBank`
- `transactionCalculateTemplate`
- a table for `transactionCalculateTemplate` hasMany `transactionBank`

I didn’t see the `transactionBank` (There are no transaction bank ..) when i’m in the view `transactionCalculateTemplate` even if the relations is set like this

```javascript
 TransactionCalculateTemplate.belongsToMany(models.transactionBank, {
      through: 'transactionCalculateTemplateTransactionBank',
      foreignKey: 'transaction_calculate_template_id',
      otherKey: 'transaction_bank_id',
      as: 'transactionCalculateTemplateThroughTransactionCalculateTemplateTransactionBanks',
    });

```

## Expected behavior

I need to see transaction bank associated to my transaction calculate template

## Context

- Project name: cashtrack
- Team name: cashtrack
- Environment name: all
- Agent (forest package) name & version: forest-express-sequelize   
7.12.2 (using express 4.17.1)
- Database type: PostgreSQL
- Recent changes made on your end if any: …

---

<div class="post-metadata">

### Author: ![morganperre](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/morganperre/32/1296_2.png) [@morganperre](https://community.forestadmin.com/u/morganperre)
#### Post date: [June 26, 2023, 8:21am UTC](https://community.forestadmin.com/t/relations-not-visible/6431/2 "2023-06-26T08:21:21Z")

</div>

Hello @michaelbaron,

You are trying to define a [many-to-many relationship](https://sequelize.org/docs/v6/advanced-association-concepts/advanced-many-to-many/), am I correct?

For this purpose, you’ve created a joint table `transactionCalculateTemplateTransactionBank`?

**Did you define the reverse relation in Sequelize**? Because you need to define both relations way so they can be visible in Forest Admin.

```javascript
TransactionBank.belongsToMany(models.transactionCalculateTemplate

```

As a complement, the belongsToMany / hasMany relationships are visible under the `Related data` section of a record.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/7/795051884879007385835cd5e612ba7c9bda28e1.png)

You can found more information in [the documentation for **forest-express-sequelize** relationships defintion in here.](https://docs.forestadmin.com/documentation/reference-guide/models/relationships#adding-a-hasmany-relationship)

Kind regards,  
Morgan
