# ROM and STI like behaviour

**URL:** <https://discourse.rom-rb.org/t/rom-and-sti-like-behaviour/79>\
**Category:** Architecture Design\
**Created:** [September 5, 2016, 2:40pm UTC](https://discourse.rom-rb.org/t/rom-and-sti-like-behaviour/79 "2016-09-05T14:40:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![janjiss](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.rom-rb.org/janjiss/32/81_2.png) [@janjiss](https://discourse.rom-rb.org/u/janjiss)\
**Post date:** [September 5, 2016, 2:40pm UTC](https://discourse.rom-rb.org/t/rom-and-sti-like-behaviour/79/1 "2016-09-05T14:40:44Z")

</div>

What’s the best way to approach following situation. I am working on meal planning app that has global ingredients (accessed by all users) and custom user specific ingredients. What would be the best approach to design this in ROM? In AR, probably something like STI would do, but I am curious on how would you guys approach it. Would you have two repos (each one working with specific type of ingredient)?  
Or is there any other way that I am not aware of that would significantly reduce complexity?

---

<div class="post-metadata">

**Author:** ![dmgr](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@dmgr](https://discourse.rom-rb.org/u/dmgr)\
**Post date:** [September 12, 2016, 12:39pm UTC](https://discourse.rom-rb.org/t/rom-and-sti-like-behaviour/79/2 "2016-09-12T12:39:27Z")

</div>

I’d like to know how to implement STI on ROM as well…  
Specifically I would like to implement model (structure?) discrimination based on a whole tuple data, no only one attribute/column.

---

<div class="post-metadata">

**Author:** ![solnic](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.rom-rb.org/solnic/32/279_2.png) [@solnic](https://discourse.rom-rb.org/u/solnic)\
**Post date:** [October 1, 2016, 6:02am UTC](https://discourse.rom-rb.org/t/rom-and-sti-like-behaviour/79/3 "2016-10-01T06:02:34Z")

</div>

See my reply [https://discuss.rom-rb.org/t/model-inheritance/82/2](https://discuss.rom-rb.org/t/model-inheritance/82/2)
