# Relationship with array of ids

**URL:** <https://community.forestadmin.com/t/relationship-with-array-of-ids/1842>\
**Category:** Help me!\
**Tags:** howtos\
**Created:** [February 12, 2021, 9:41pm UTC](https://community.forestadmin.com/t/relationship-with-array-of-ids/1842 "2021-02-12T21:41:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bjmrqspockee](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/bjmrqspockee/32/1536_2.png) [@bjmrqspockee](https://community.forestadmin.com/u/bjmrqspockee)\
**Post date:** [February 12, 2021, 9:41pm UTC](https://community.forestadmin.com/t/relationship-with-array-of-ids/1842/1 "2021-02-12T21:41:05Z")

</div>

Hello,

I am trying to test Admin Forest for our company,  
I am working with a database that is not so relational.

For example we have users and store and many users are related to the store, and for this we store an array of ids in the store table.

I am wondering how I could best use Admin Forest in this situation (disclaimer I do not have a lot of Sequelize experience) so I am having hard time trying to build this relationship (and the others).

Is it actually possible to do this with sequielize or would I need to use smart relationship?

Thanks for help in advance.

Have a good day

---

<div class="post-metadata">

**Author:** ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)\
**Post date:** [February 15, 2021, 10:57am UTC](https://community.forestadmin.com/t/relationship-with-array-of-ids/1842/2 "2021-02-15T10:57:16Z")

</div>

Hi 👋 @bjmrqspockee welcome to our community.  
The better way to do this kind of stuff is to create in the database a join table, but is not the subject here.  
As you said, actually the better way for you to achieve your goal is to create a smart relationship.  
You can follow this [documentation](https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship#creating-a-hasmany-smart-relationship), and feel free to ask any question if you have any problems.  
Let me know if it help.

---

<div class="post-metadata">

**Author:** ![bjmrqspockee](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/bjmrqspockee/32/1536_2.png) [@bjmrqspockee](https://community.forestadmin.com/u/bjmrqspockee)\
**Post date:** [February 17, 2021, 6:55pm UTC](https://community.forestadmin.com/t/relationship-with-array-of-ids/1842/3 "2021-02-17T18:55:33Z")

</div>

Hello @Arnaud_Moncel thanks for helping me out on this!

I do agree with you unfortunately remodelling the database is not an option for now.

I’ll give the smart actions a try and comme back to you if I have any difficulty.

have a good day
