# Usage Stories

**URL:** https://discourse.rom-rb.org/c/usage-stories/7.md

[Latest](https://discourse.rom-rb.org/latest.md) · [Categories](https://discourse.rom-rb.org/categories.md)

---

## [About the Usage Stories category](https://discourse.rom-rb.org/t/about-the-usage-stories-category/17)

<div class="topic-metadata">

**Author:** [@solnic](https://discourse.rom-rb.org/u/solnic)\
**Replies:** 1\
**Last updated:** [September 12, 2017, 6:52pm UTC](https://discourse.rom-rb.org/t/about-the-usage-stories-category/17 "2017-09-12T18:52:33Z")

</div>

Are you using ROM? Tell us how. What went great, what was so-so, what could be improved.

---

## [What made you interested in ROM?](https://discourse.rom-rb.org/t/what-made-you-interested-in-rom/28)

<div class="topic-metadata">

**Author:** [@solnic](https://discourse.rom-rb.org/u/solnic)\
**Replies:** 16\
**Last updated:** [June 22, 2023, 10:24am UTC](https://discourse.rom-rb.org/t/what-made-you-interested-in-rom/28 "2023-06-22T10:24:32Z")

</div>

I'm always very curious to know how people discover the project and what is their motivation to learn it and try it out. Please tell me your story, even when it wasn't successful. If ROM didn't meet your requirements ple…

---

## [ROM SQL CTE tables](https://discourse.rom-rb.org/t/rom-sql-cte-tables/433)

<div class="topic-metadata">

**Author:** [@alex-lairan](https://discourse.rom-rb.org/u/alex-lairan)\
**Replies:** 6\
**Last updated:** [June 22, 2023, 9:32am UTC](https://discourse.rom-rb.org/t/rom-sql-cte-tables/433 "2023-06-22T09:32:35Z")

</div>

Hi. It is possible to do CTE table query with ROM SQL or we have to handle it at the Sequel level? I didn’t find anything on the source code of the gem so I am asking. And if no, what would be the steps to implement i…

---

## [ROM Is a Failed Project](https://discourse.rom-rb.org/t/rom-is-a-failed-project/592)

<div class="topic-metadata">

**Author:** [@mslinn](https://discourse.rom-rb.org/u/mslinn)\
**Replies:** 1\
**Last updated:** [February 6, 2023, 4:04am UTC](https://discourse.rom-rb.org/t/rom-is-a-failed-project/592 "2023-02-06T04:04:44Z")

</div>

I used Ruby Data Mapper and liked it. Stuff worked, documentation lined up with shipped bits. Then I learned that it had been abandoned in favor of ROM - supposedly a version 2, but actually ROM is a completely different…

---

## [Using ROM 5.3.0 Repository with Hanami 2.0](https://discourse.rom-rb.org/t/using-rom-5-3-0-repository-with-hanami-2-0/569)

<div class="topic-metadata">

**Author:** [@jignesh](https://discourse.rom-rb.org/u/jignesh)\
**Replies:** 8\
**Last updated:** [November 24, 2022, 8:06pm UTC](https://discourse.rom-rb.org/t/using-rom-5-3-0-repository-with-hanami-2-0/569 "2022-11-24T20:06:49Z")

</div>

Hello, I am trying to build a web-app prototype with Hanami 2.0 and as part of that I am trying to utilize ROM Repositories. Below shown is the relevant code snippet for a question I have: # startup\_template/slices/adm…

---

## [SQL Query performance logging](https://discourse.rom-rb.org/t/sql-query-performance-logging/458)

<div class="topic-metadata">

**Author:** [@apohllo](https://discourse.rom-rb.org/u/apohllo)\
**Replies:** 5\
**Last updated:** [May 10, 2021, 7:50am UTC](https://discourse.rom-rb.org/t/sql-query-performance-logging/458 "2021-05-10T07:50:52Z")

</div>

I would like to know which parts of my application are slow. Is there a way to configure ROM or is there a separate tool, that would log the long queries? I am using Hanami 1.3, but I substituted its DB layer with ROM c…

---

## [ROM + Rails in production](https://discourse.rom-rb.org/t/rom-rails-in-production/379)

<div class="topic-metadata">

**Author:** [@Ronald](https://discourse.rom-rb.org/u/Ronald)\
**Replies:** 1\
**Last updated:** [June 12, 2020, 11:10am UTC](https://discourse.rom-rb.org/t/rom-rails-in-production/379 "2020-06-12T11:10:30Z")

</div>

Hey, Is there anybody here that uses ROM + Rails in production? Since ROM uses Sequel, its a safe and mature usage? (replace ActiveRecord for ROM)

---

## [Is there a ROM XML Adapter?](https://discourse.rom-rb.org/t/is-there-a-rom-xml-adapter/344)

<div class="topic-metadata">

**Author:** [@pflaumingo](https://discourse.rom-rb.org/u/pflaumingo)\
**Replies:** 0\
**Last updated:** [December 16, 2019, 4:47pm UTC](https://discourse.rom-rb.org/t/is-there-a-rom-xml-adapter/344 "2019-12-16T16:47:46Z")

</div>

I’ve just started looking at ROM and I was wondering if there is an XML adapter available? Or if anyone has any suggestions on using ROM for working with XML? Thank you!

---

## [Difference between repositories and relations](https://discourse.rom-rb.org/t/difference-between-repositories-and-relations/317)

<div class="topic-metadata">

**Author:** [@arnaud](https://discourse.rom-rb.org/u/arnaud)\
**Replies:** 7\
**Last updated:** [June 3, 2019, 12:50pm UTC](https://discourse.rom-rb.org/t/difference-between-repositories-and-relations/317 "2019-06-03T12:50:41Z")

</div>

Hey! I’ve started using ROM on a little side project, and I’m a little bit confused by all the concepts involved: containers, repositories, relations, structs… I’m starting to feel that plain Sequel is enough for my use…

---

## [Flattening and mapping nested data structures](https://discourse.rom-rb.org/t/flattening-and-mapping-nested-data-structures/315)

<div class="topic-metadata">

**Author:** [@alexanderfrankel](https://discourse.rom-rb.org/u/alexanderfrankel)\
**Replies:** 2\
**Last updated:** [May 14, 2019, 1:18am UTC](https://discourse.rom-rb.org/t/flattening-and-mapping-nested-data-structures/315 "2019-05-14T01:18:35Z")

</div>

I have the following relations: class HomesRelation \< ROM::Relation\[:sql\] gateway :default schema(:homes, infer: true) do associations do has\_many :attributes, through: :home\_attributes end end end …

---

## [Create multiple entities](https://discourse.rom-rb.org/t/create-multiple-entities/265)

<div class="topic-metadata">

**Author:** [@drqCode](https://discourse.rom-rb.org/u/drqCode)\
**Replies:** 1\
**Last updated:** [September 28, 2018, 2:59am UTC](https://discourse.rom-rb.org/t/create-multiple-entities/265 "2018-09-28T02:59:06Z")

</div>

I have this scenario when creating multiple (bulk) users with some existing tasks. The only bulk create implementation I have for now is to iterate through the list of new users, create a user, get his id and insert in U…

---

## [Not found exception](https://discourse.rom-rb.org/t/not-found-exception/263)

<div class="topic-metadata">

**Author:** [@calin](https://discourse.rom-rb.org/u/calin)\
**Replies:** 1\
**Last updated:** [July 1, 2018, 9:02am UTC](https://discourse.rom-rb.org/t/not-found-exception/263 "2018-07-01T09:02:05Z")

</div>

I need to show a 404 page when the record is not found, using one! I will get a ROM::TupleCountMismatchError exception. I expected something along the lines RecordNotFound as an exception is there a better way to do thi…

---

## [Rom-sql upsert multiple entities by default](https://discourse.rom-rb.org/t/rom-sql-upsert-multiple-entities-by-default/240)

<div class="topic-metadata">

**Author:** [@joelvh](https://discourse.rom-rb.org/u/joelvh)\
**Replies:** 8\
**Last updated:** [June 28, 2018, 7:47pm UTC](https://discourse.rom-rb.org/t/rom-sql-upsert-multiple-entities-by-default/240 "2018-06-28T19:47:41Z")

</div>

Hi, I was just working on upserting records and was surprised to see that upsert in rom-sql does not support multiple records at once. My assumption was that the command would support multiple entities at once like the …

---

## [Mapping nested entities and other transformation examples](https://discourse.rom-rb.org/t/mapping-nested-entities-and-other-transformation-examples/223)

<div class="topic-metadata">

**Author:** [@joelvh](https://discourse.rom-rb.org/u/joelvh)\
**Replies:** 8\
**Last updated:** [April 27, 2018, 5:31pm UTC](https://discourse.rom-rb.org/t/mapping-nested-entities-and-other-transformation-examples/223 "2018-04-27T17:31:37Z")

</div>

Hi all, Been reading up on ROM and my first project is a ROM adapter for the RailsEventStore project. I am still getting my head around the shift from ActiveRecord to this paradigm, but ROM is what I’ve been looking for…

---

## [Instantiating a custom Struct instance](https://discourse.rom-rb.org/t/instantiating-a-custom-struct-instance/224)

<div class="topic-metadata">

**Author:** [@joelvh](https://discourse.rom-rb.org/u/joelvh)\
**Replies:** 5\
**Last updated:** [April 17, 2018, 6:36pm UTC](https://discourse.rom-rb.org/t/instantiating-a-custom-struct-instance/224 "2018-04-17T18:36:52Z")

</div>

I have an Events relation that defines a schema. I’ve configured it to use the Event struct, which inherits from ROM::Struct. How can I instantiate a new Event instance and then use the create command to insert new recor…

---

## [In which I successfully debug associations which wouldn't set foreign keys, and ponder documentation improvements and sanity checks](https://discourse.rom-rb.org/t/in-which-i-successfully-debug-associations-which-wouldnt-set-foreign-keys-and-ponder-documentation-improvements-and-sanity-checks/169)

<div class="topic-metadata">

**Author:** [@twhaples](https://discourse.rom-rb.org/u/twhaples)\
**Replies:** 4\
**Last updated:** [July 23, 2017, 2:36pm UTC](https://discourse.rom-rb.org/t/in-which-i-successfully-debug-associations-which-wouldnt-set-foreign-keys-and-ponder-documentation-improvements-and-sanity-checks/169 "2017-07-23T14:36:30Z")

</div>

I had a problem with my project. I didn’t want help fixing it, though, I wanted understanding how to debug it and fix it myself because I anticipated that I would encounter similar problems in the future. Herein follows…

---

## [How are people organising migrations](https://discourse.rom-rb.org/t/how-are-people-organising-migrations/150)

<div class="topic-metadata">

**Author:** [@glenndavy](https://discourse.rom-rb.org/u/glenndavy)\
**Replies:** 1\
**Last updated:** [April 12, 2017, 2:34pm UTC](https://discourse.rom-rb.org/t/how-are-people-organising-migrations/150 "2017-04-12T14:34:43Z")

</div>

Hi all pls forgive me if this is the wrong place for question like this, if so, just let me know and I'll head on over to the correct place. I'm curious how people are organising migrations. Mostly around how they e…

---

## [Model inheritance](https://discourse.rom-rb.org/t/model-inheritance/82)

<div class="topic-metadata">

**Author:** [@dmgr](https://discourse.rom-rb.org/u/dmgr)\
**Replies:** 1\
**Last updated:** [October 1, 2016, 6:01am UTC](https://discourse.rom-rb.org/t/model-inheritance/82 "2016-10-01T06:01:06Z")

</div>

Hi ROM community, Could you just give me a hint where I have to look on to implement a simple inheritance based on a attribute. To keep things simple, lets say I want to have a SimpleProject and ComplexProject and the …

---

## [ROM Usage in Production](https://discourse.rom-rb.org/t/rom-usage-in-production/44)

<div class="topic-metadata">

**Author:** [@robinetmiller](https://discourse.rom-rb.org/u/robinetmiller)\
**Replies:** 1\
**Last updated:** [September 5, 2016, 2:46pm UTC](https://discourse.rom-rb.org/t/rom-usage-in-production/44 "2016-09-05T14:46:42Z")

</div>

We'd like to collect together sites, products, companies, or neat personal projects that use ROM under the hood. If you're using ROM right now in a production environment, please list it here with the following info: …

---

## [What adapters are we missing?](https://discourse.rom-rb.org/t/what-adapters-are-we-missing/39)

<div class="topic-metadata">

**Author:** [@hmadison](https://discourse.rom-rb.org/u/hmadison)\
**Replies:** 2\
**Last updated:** [May 25, 2016, 4:50am UTC](https://discourse.rom-rb.org/t/what-adapters-are-we-missing/39 "2016-05-25T04:50:19Z")

</div>

Currently ROM supports a number of different adapters to various data stores. I'm wondering if anyone has found a database/data store/api that they feel would be a good fit for ROM?
