# Latest

**URL:** https://discourse.rom-rb.org/latest.md?no_subcategories=false

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

---

## [PostgreSQL Type for tsvector (full-text searching)](https://discourse.rom-rb.org/t/postgresql-type-for-tsvector-full-text-searching/705)

<div class="topic-metadata">

**Author:** [@sandbergja](https://discourse.rom-rb.org/u/sandbergja)\
**Replies:** 0\
**Last updated:** [December 1, 2025, 8:27pm UTC](https://discourse.rom-rb.org/t/postgresql-type-for-tsvector-full-text-searching/705 "2025-12-01T20:27:04Z")

</div>

Hello! I have a table in my Postgres database like so: CREATE TABLE public.library\_database\_records ( id bigint NOT NULL, libguides\_id bigint NOT NULL, name character varying NOT NULL, description chara…

---

## [Implementing transient attributes](https://discourse.rom-rb.org/t/implementing-transient-attributes/704)

<div class="topic-metadata">

**Author:** [@rickenharp](https://discourse.rom-rb.org/u/rickenharp)\
**Replies:** 2\
**Last updated:** [October 9, 2025, 9:07am UTC](https://discourse.rom-rb.org/t/implementing-transient-attributes/704 "2025-10-09T09:07:19Z")

</div>

I needed transient attributes in ROM::Factory for my Hanami app. Since all I could find was this old post (Support transient attributes in rom-factory), I took a stab at implementing transient attributes myself. I have …

---

## [Attribute serialization](https://discourse.rom-rb.org/t/attribute-serialization/700)

<div class="topic-metadata">

**Author:** [@pointlessone](https://discourse.rom-rb.org/u/pointlessone)\
**Replies:** 4\
**Last updated:** [August 8, 2025, 1:01pm UTC](https://discourse.rom-rb.org/t/attribute-serialization/700 "2025-08-08T13:01:52Z")

</div>

I’m trying to figure out how to serialize attribute to store in the db. I have Items, they can have multiple tags. On the app side I want them represented as an array of strings but in the db it’s stored in a string col…

---

## [Migration file: Default value for timestamp column](https://discourse.rom-rb.org/t/migration-file-default-value-for-timestamp-column/702)

<div class="topic-metadata">

**Author:** [@jignesh](https://discourse.rom-rb.org/u/jignesh)\
**Replies:** 1\
**Last updated:** [July 7, 2025, 9:23pm UTC](https://discourse.rom-rb.org/t/migration-file-default-value-for-timestamp-column/702 "2025-07-07T21:23:47Z")

</div>

In my Hanami 2.2 app I have a migration file having following code: # frozen\_string\_literal: true ROM::SQL.migration do # Add your migration here. # # See https://guides.hanamirb.org/v2.2/database/migrations/ for…

---

## [How to properly set association to a self junction table?](https://discourse.rom-rb.org/t/how-to-properly-set-association-to-a-self-junction-table/696)

<div class="topic-metadata">

**Author:** [@Franck](https://discourse.rom-rb.org/u/Franck)\
**Replies:** 1\
**Last updated:** [May 23, 2025, 6:59am UTC](https://discourse.rom-rb.org/t/how-to-properly-set-association-to-a-self-junction-table/696 "2025-05-23T06:59:33Z")

</div>

Hi there, I’m trying to figure out my association setting. Here is a MWE : A users table, and a mentoring table. Each user can mentor any number of other users (mentees). And each mentee could be mentored by any number…

---

## [Request for improvements of migration rake commands](https://discourse.rom-rb.org/t/request-for-improvements-of-migration-rake-commands/679)

<div class="topic-metadata">

**Author:** [@vizvamitra](https://discourse.rom-rb.org/u/vizvamitra)\
**Replies:** 1\
**Last updated:** [March 10, 2025, 1:25pm UTC](https://discourse.rom-rb.org/t/request-for-improvements-of-migration-rake-commands/679 "2025-03-10T13:25:32Z")

</div>

I decided to describe here a number of things I miss in my developer routines regarding migrations. db:rollback task Currently, to rollback you have to find a specific migration name and execute rake 'db:migrate\[1234567…

---

## [Unintuitive migration order when extra digits in timestamp](https://discourse.rom-rb.org/t/unintuitive-migration-order-when-extra-digits-in-timestamp/678)

<div class="topic-metadata">

**Author:** [@vizvamitra](https://discourse.rom-rb.org/u/vizvamitra)\
**Replies:** 4\
**Last updated:** [March 7, 2025, 11:39am UTC](https://discourse.rom-rb.org/t/unintuitive-migration-order-when-extra-digits-in-timestamp/678 "2025-03-07T11:39:19Z")

</div>

Hi community, Several months ago we’ve created a migration with an extra digit in it’s timestamp. Not a big deal for prod, so we haven’t noticed it for 4 months. But recently I added another migration that changes the s…

---

## [Associating existing database entries with has\_many :through](https://discourse.rom-rb.org/t/associating-existing-database-entries-with-has-many-through/677)

<div class="topic-metadata">

**Author:** [@rickenharp](https://discourse.rom-rb.org/u/rickenharp)\
**Replies:** 0\
**Last updated:** [February 20, 2025, 9:44am UTC](https://discourse.rom-rb.org/t/associating-existing-database-entries-with-has-many-through/677 "2025-02-20T09:44:15Z")

</div>

I’m evaluating using ROM instead of Sequel for a new project, and I have run into a problem: we have specifications and targets. Each specification can have many targets, and each target can have many specifications. To…

---

## [Postgresql schemas (search\_path)](https://discourse.rom-rb.org/t/postgresql-schemas-search-path/669)

<div class="topic-metadata">

**Author:** [@krautcat](https://discourse.rom-rb.org/u/krautcat)\
**Replies:** 2\
**Last updated:** [January 23, 2025, 6:35pm UTC](https://discourse.rom-rb.org/t/postgresql-schemas-search-path/669 "2025-01-23T18:35:32Z")

</div>

Hi there, I have a setup of PostgreSQL database with multiple schemas. They have some tables with the same name. Is there any possibility use multiple gateways for different search\_paths?

---

## [Local variable override field in query](https://discourse.rom-rb.org/t/local-variable-override-field-in-query/665)

<div class="topic-metadata">

**Author:** [@vladimirtcats](https://discourse.rom-rb.org/u/vladimirtcats)\
**Replies:** 2\
**Last updated:** [November 22, 2024, 5:27am UTC](https://discourse.rom-rb.org/t/local-variable-override-field-in-query/665 "2024-11-22T05:27:48Z")

</div>

Hi everyone I have table with column “metadata”, variable metadata and the query metadata contains hash when I run this query: scope = scope.where { metadata.contain(level: metadata\[:level\]) } I get error: undefine…

---

## [Is rom-factory compatible with hamami?](https://discourse.rom-rb.org/t/is-rom-factory-compatible-with-hamami/663)

<div class="topic-metadata">

**Author:** [@vladimirtcats](https://discourse.rom-rb.org/u/vladimirtcats)\
**Replies:** 5\
**Last updated:** [November 18, 2024, 7:56pm UTC](https://discourse.rom-rb.org/t/is-rom-factory-compatible-with-hamami/663 "2024-11-18T19:56:57Z")

</div>

Hi everyone I am trying to config rom-factory. I have created app and put provider Hanami.app.register\_provider :persistence, namespace: true do prepare do require ‘rom-changeset’ require ‘rom/core’ require ‘rom/s…

---

## [Attributes appended in associated view stripped when override:true](https://discourse.rom-rb.org/t/attributes-appended-in-associated-view-stripped-when-override-true/649)

<div class="topic-metadata">

**Author:** [@CharlieWWW](https://discourse.rom-rb.org/u/CharlieWWW)\
**Replies:** 0\
**Last updated:** [August 27, 2024, 10:06am UTC](https://discourse.rom-rb.org/t/attributes-appended-in-associated-view-stripped-when-override-true/649 "2024-08-27T10:06:29Z")

</div>

Hi, In our project we are overriding relation associations with custom views. For several reasons (principally many-to-many associations, and multi-table inheritance) we have lots of intermediary tables, which means ou…

---

## [Building weird commands](https://discourse.rom-rb.org/t/building-weird-commands/644)

<div class="topic-metadata">

**Author:** [@pointlessone](https://discourse.rom-rb.org/u/pointlessone)\
**Replies:** 0\
**Last updated:** [June 5, 2024, 1:35pm UTC](https://discourse.rom-rb.org/t/building-weird-commands/644 "2024-06-05T13:35:42Z")

</div>

I’m very new to both ROM and Sequel but it seem like what I’m trying to do is very non-standard so I might as well ask. What I’m trying to do I’m using sqlite. It has this non-standard syntax for updates: update doodad…

---

## [Encrypted attributes](https://discourse.rom-rb.org/t/encrypted-attributes/637)

<div class="topic-metadata">

**Author:** [@katafrakt](https://discourse.rom-rb.org/u/katafrakt)\
**Replies:** 3\
**Last updated:** [June 3, 2024, 6:32pm UTC](https://discourse.rom-rb.org/t/encrypted-attributes/637 "2024-06-03T18:32:49Z")

</div>

Some time ago I created a gem adding encrypted attributes to relations using custom types. It is designed to be compatible with ActiveRecord encryption, in case you’re moving from ActiveRecord-powered database to ROM. Fo…

---

## [Rom 6.0 - should we use it?](https://discourse.rom-rb.org/t/rom-6-0-should-we-use-it/612)

<div class="topic-metadata">

**Author:** [@pboling](https://discourse.rom-rb.org/u/pboling)\
**Replies:** 2\
**Last updated:** [April 23, 2024, 10:49am UTC](https://discourse.rom-rb.org/t/rom-6-0-should-we-use-it/612 "2024-04-23T10:49:03Z")

</div>

The milestone looks about halfway complete. The gem version has been set to 6.0.0.alpha1. Is it at a point where bug reports derived from real usage would be helpful? Or is it expected to be in a fairly broken state s…

---

## [Implementing nested joins using join method](https://discourse.rom-rb.org/t/implementing-nested-joins-using-join-method/626)

<div class="topic-metadata">

**Author:** [@jignesh](https://discourse.rom-rb.org/u/jignesh)\
**Replies:** 2\
**Last updated:** [April 11, 2024, 3:36pm UTC](https://discourse.rom-rb.org/t/implementing-nested-joins-using-join-method/626 "2024-04-11T15:36:51Z")

</div>

I am using following versions in Gemfile gem 'rom', '~\> 5.3' gem 'rom-sql', '~\> 3.6', '\>= 3.6.1' Following are my relations info: Relation\_1 \< ROM::Relation\[:sql\] associations do has\_many :relation\_3 has\_ma…

---

## [Mysql ssl connection issue](https://discourse.rom-rb.org/t/mysql-ssl-connection-issue/634)

<div class="topic-metadata">

**Author:** [@codeslinger](https://discourse.rom-rb.org/u/codeslinger)\
**Replies:** 2\
**Last updated:** [January 31, 2024, 10:52pm UTC](https://discourse.rom-rb.org/t/mysql-ssl-connection-issue/634 "2024-01-31T22:52:59Z")

</div>

Hello, In your documentation (ROM) you indicate that the option to be used is “:sslmode” and “:sslca”. However in the code base (mysql2 0.5.4) I see they are using “:ssl\_mode”. Can you tell me if the documentation is wr…

---

## [ROM::Struct mapping question](https://discourse.rom-rb.org/t/rom-struct-mapping-question/633)

<div class="topic-metadata">

**Author:** [@ck0jo](https://discourse.rom-rb.org/u/ck0jo)\
**Replies:** 0\
**Last updated:** [January 2, 2024, 4:59pm UTC](https://discourse.rom-rb.org/t/rom-struct-mapping-question/633 "2024-01-02T16:59:36Z")

</div>

Hello ROM Community, I’m currently exploring ROM for database interactions and have encountered an issue with mapping database results to my custom entity, specifically regarding a custom enum type. Repository Setup: I…

---

## [Typo in /learn/factory/0.10/#associations](https://discourse.rom-rb.org/t/typo-in-learn-factory-0-10-associations/631)

<div class="topic-metadata">

**Author:** [@krzykamil](https://discourse.rom-rb.org/u/krzykamil)\
**Replies:** 0\
**Last updated:** [January 2, 2024, 1:03pm UTC](https://discourse.rom-rb.org/t/typo-in-learn-factory-0-10-associations/631 "2024-01-02T13:03:42Z")

</div>

Hey, found a simple typo that confused me for a second. Factory.define(:group) do |f| f.name 'Admins' end Factory.define(:user) do |f| f.name 'John' f.association(:user) end In current state, this states that us…

---

## [Specify timestamps plugin in Root repository](https://discourse.rom-rb.org/t/specify-timestamps-plugin-in-root-repository/607)

<div class="topic-metadata">

**Author:** [@npupko](https://discourse.rom-rb.org/u/npupko)\
**Replies:** 4\
**Last updated:** [November 13, 2023, 5:58pm UTC](https://discourse.rom-rb.org/t/specify-timestamps-plugin-in-root-repository/607 "2023-11-13T17:58:40Z")

</div>

Hey! I’m trying to experiment with Rom-rb and have dry-system + rom-rb application. I have users repository: # frozen\_string\_literal: true require 'persistence/repositories/root' require 'persistence/entities/user' mo…

---

## [Problems using Rom with a legacy database](https://discourse.rom-rb.org/t/problems-using-rom-with-a-legacy-database/573)

<div class="topic-metadata">

**Author:** [@choallin](https://discourse.rom-rb.org/u/choallin)\
**Replies:** 3\
**Last updated:** [August 3, 2023, 9:28am UTC](https://discourse.rom-rb.org/t/problems-using-rom-with-a-legacy-database/573 "2023-08-03T09:28:48Z")

</div>

I have a new Hanami 2 application and have configured Rom according to the “Getting Started” guidelines. I have access to my (legacy) database now, so this is working. Now, I want to change a few things in my schema so …

---

## [How to configure and pass db connection when using Puma](https://discourse.rom-rb.org/t/how-to-configure-and-pass-db-connection-when-using-puma/621)

<div class="topic-metadata">

**Author:** [@codeslinger](https://discourse.rom-rb.org/u/codeslinger)\
**Replies:** 2\
**Last updated:** [July 29, 2023, 12:36pm UTC](https://discourse.rom-rb.org/t/how-to-configure-and-pass-db-connection-when-using-puma/621 "2023-07-29T12:36:12Z")

</div>

Hi, We have puma configured with 4 workers and min/max threads set to 5. We currently create a rom configuration and cache it in a variable. module MyPersistance extend Dry::Configurable ... def self.configurat…

---

## [How to use Mapper with Changeset?](https://discourse.rom-rb.org/t/how-to-use-mapper-with-changeset/616)

<div class="topic-metadata">

**Author:** [@pboling](https://discourse.rom-rb.org/u/pboling)\
**Replies:** 11\
**Last updated:** [July 8, 2023, 12:49am UTC](https://discourse.rom-rb.org/t/how-to-use-mapper-with-changeset/616 "2023-07-08T00:49:35Z")

</div>

My database looks nothing like my entities, and so my setup is fairly more complex than normal, and I am ending up needing to customize seemingly every layer. I am able to create data, but part of the default insert is …

---

## [Relation#map\_to does nothing?](https://discourse.rom-rb.org/t/relation-map-to-does-nothing/618)

<div class="topic-metadata">

**Author:** [@pboling](https://discourse.rom-rb.org/u/pboling)\
**Replies:** 1\
**Last updated:** [July 7, 2023, 6:21pm UTC](https://discourse.rom-rb.org/t/relation-map-to-does-nothing/618 "2023-07-07T18:21:09Z")

</div>

Learning site has: class User attr\_reader :attributes def initialize(attributes) @attributes = attributes end def \[\](name) attributes\[name\] end end users.by\_pk(1).map\_to(User) # =\> #\<User:0x007fa7ea…

---

## [Changeset pre-configured mapping](https://discourse.rom-rb.org/t/changeset-pre-configured-mapping/529)

<div class="topic-metadata">

**Author:** [@codeslinger](https://discourse.rom-rb.org/u/codeslinger)\
**Replies:** 7\
**Last updated:** [July 7, 2023, 11:17am UTC](https://discourse.rom-rb.org/t/changeset-pre-configured-mapping/529 "2023-07-07T11:17:25Z")

</div>

Greetings, Is it possible to use a pre-configured mapping (used for commands) in the change set pipe? class MyMapper \< ROM::Transformer relation :my\_relation register\_as :my\_relation\_mapper map do OR do i need …

---

## [ROM::Transformer is based on Transproc still?](https://discourse.rom-rb.org/t/rom-transformer-is-based-on-transproc-still/617)

<div class="topic-metadata">

**Author:** [@pboling](https://discourse.rom-rb.org/u/pboling)\
**Replies:** 1\
**Last updated:** [July 7, 2023, 11:16am UTC](https://discourse.rom-rb.org/t/rom-transformer-is-based-on-transproc-still/617 "2023-07-07T11:16:22Z")

</div>

I was thinking it would be based on dry-rb/transformer, since transproc has been dead now for 4 years. transproc is still a direct dependency of various core ROM tools though. What am I to make of this? Am I missing s…

---

## [When use\_namespace is ignored, should it raise error instead?](https://discourse.rom-rb.org/t/when-use-namespace-is-ignored-should-it-raise-error-instead/611)

<div class="topic-metadata">

**Author:** [@pboling](https://discourse.rom-rb.org/u/pboling)\
**Replies:** 6\
**Last updated:** [July 3, 2023, 2:48pm UTC](https://discourse.rom-rb.org/t/when-use-namespace-is-ignored-should-it-raise-error-instead/611 "2023-07-03T14:48:27Z")

</div>

I have been struggling with getting ROM working, and I am still unable to get use\_namespace to result in objects being instantiated from my custom Entities. I am not sure of the causes, but I am wondering if use\_namespa…

---

## [Excluding columns from inferred schema](https://discourse.rom-rb.org/t/excluding-columns-from-inferred-schema/591)

<div class="topic-metadata">

**Author:** [@pat](https://discourse.rom-rb.org/u/pat)\
**Replies:** 12\
**Last updated:** [June 23, 2023, 6:07pm UTC](https://discourse.rom-rb.org/t/excluding-columns-from-inferred-schema/591 "2023-06-23T18:07:30Z")

</div>

Hi all, I’m working on some migrations to remove columns from a table - and I’d like to first exclude the columns from the returned datasets (like the ignored\_columns method in ActiveRecord, as recommended by strong\_mig…

---

## [Just mappers? Upgrading from old 'rom-mapper' use](https://discourse.rom-rb.org/t/just-mappers-upgrading-from-old-rom-mapper-use/601)

<div class="topic-metadata">

**Author:** [@brcarp](https://discourse.rom-rb.org/u/brcarp)\
**Replies:** 6\
**Last updated:** [June 23, 2023, 6:00pm UTC](https://discourse.rom-rb.org/t/just-mappers-upgrading-from-old-rom-mapper-use/601 "2023-06-23T18:00:38Z")

</div>

I’m reaching out for some advice because I’m not too familiar with ROM and am attempting to upgrade from an older use of the standalone rom-mapper gem to do some data mapping, which I suspect was inspired by this old pos…

---

## [How to specify custom Types when backed by SQL](https://discourse.rom-rb.org/t/how-to-specify-custom-types-when-backed-by-sql/609)

<div class="topic-metadata">

**Author:** [@pboling](https://discourse.rom-rb.org/u/pboling)\
**Replies:** 1\
**Last updated:** [June 22, 2023, 10:43pm UTC](https://discourse.rom-rb.org/t/how-to-specify-custom-types-when-backed-by-sql/609 "2023-06-22T22:43:55Z")

</div>

require 'bundler/inline' gemfile do source 'https://rubygems.org' gem 'dry-types' gem 'rom' gem 'rom-sql' gem 'sqlite3' end module Marv module Girt module Entities Types = Dry.Types() # Note sure …

[Next page](https://discourse.rom-rb.org/latest.md?no_subcategories=false&page=1)
