# Polymorphic Association

**URL:** <https://discourse.rom-rb.org/t/polymorphic-association/338>\
**Category:** Uncategorized\
**Created:** [November 29, 2019, 5:36pm UTC](https://discourse.rom-rb.org/t/polymorphic-association/338 "2019-11-29T17:36:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![captainhusaynpinguin](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.rom-rb.org/captainhusaynpinguin/32/182_2.png) [@captainhusaynpinguin](https://discourse.rom-rb.org/u/captainhusaynpinguin)\
**Post date:** [November 29, 2019, 5:36pm UTC](https://discourse.rom-rb.org/t/polymorphic-association/338/1 "2019-11-29T17:36:59Z")

</div>

Hi there,

I’m new to Ruby & co and I just played with Rails and trying to migrate a CSM to Hanami. As Hanami’s default is ROM, I was wondering if there is the _polymorphic association_ in ROM? Why not?

In my naive view, other than _polymorphic associations_, it really makes little sense to not use plain SQL to CRUD data on a database. I mean, sure, it looks more ruby-like when writing, but at the end of the day, SQL isn’t that much a burden to have to translate it into another language!

---

<div class="post-metadata">

**Author:** ![calin](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.rom-rb.org/calin/32/103_2.png) [@calin](https://discourse.rom-rb.org/u/calin)\
**Post date:** [December 1, 2019, 2:26am UTC](https://discourse.rom-rb.org/t/polymorphic-association/338/2 "2019-12-01T02:26:28Z")

</div>

Hey, welcome

There is some debate in the community about polymorphic associations if they are a pattern or an ati-pattern.

There is a issue on rom-sql about it [https://github.com/rom-rb/rom-repository/issues/73](https://github.com/rom-rb/rom-repository/issues/73) and some possible solutions there.

Hope this helps,
