# Latest

**URL:** https://discourse.rom-rb.org/latest.md?page=3

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

**Page:** 4

---

## [SQLite migration causes NoMethodError: undefined method \`to\_sym' for nil:NilClass](https://discourse.rom-rb.org/t/sqlite-migration-causes-nomethoderror-undefined-method-to-sym-for-nil-nilclass/489)

<div class="topic-metadata">

**Author:** [@idchlife](https://discourse.rom-rb.org/u/idchlife)\
**Replies:** 1\
**Last updated:** [November 22, 2021, 3:56pm UTC](https://discourse.rom-rb.org/t/sqlite-migration-causes-nomethoderror-undefined-method-to-sym-for-nil-nilclass/489 "2021-11-22T15:56:51Z")

</div>

Hello guys! Here is my relation class code: class Code \< ROM::Relation\[:sql\] schema do attribute :id, Types::Int attribute :code, Types::String attribute :used, Types::Bool primary\_key :id end end …

---

## [Mapping combined resources to entities in different namespaces](https://discourse.rom-rb.org/t/mapping-combined-resources-to-entities-in-different-namespaces/484)

<div class="topic-metadata">

**Author:** [@guilherme-andrade](https://discourse.rom-rb.org/u/guilherme-andrade)\
**Replies:** 1\
**Last updated:** [October 14, 2021, 1:01am UTC](https://discourse.rom-rb.org/t/mapping-combined-resources-to-entities-in-different-namespaces/484 "2021-10-14T01:01:58Z")

</div>

Hi there, newbie rom-rb user here, and this is probably a stupid question, will be happy to know if this completely violates rom patterns. In repositories, is there a way to combine and relation, but mapping it to diffe…

---

## [Best way to load belongs\_to-assocation in one select?](https://discourse.rom-rb.org/t/best-way-to-load-belongs-to-assocation-in-one-select/481)

<div class="topic-metadata">

**Author:** [@wuarmin](https://discourse.rom-rb.org/u/wuarmin)\
**Replies:** 0\
**Last updated:** [October 7, 2021, 7:07am UTC](https://discourse.rom-rb.org/t/best-way-to-load-belongs-to-assocation-in-one-select/481 "2021-10-07T07:07:18Z")

</div>

Hey, I love ROM and I am curious about the above question: What’s the best way to load belongs\_to-assocation in one select? # states-relation module Orm module Relations class States \< ROM::Relation\[:sql\] s…

---

## [Querying many tuples with composite key](https://discourse.rom-rb.org/t/querying-many-tuples-with-composite-key/472)

<div class="topic-metadata">

**Author:** [@apohllo](https://discourse.rom-rb.org/u/apohllo)\
**Replies:** 3\
**Last updated:** [September 20, 2021, 5:06pm UTC](https://discourse.rom-rb.org/t/querying-many-tuples-with-composite-key/472 "2021-09-20T17:06:44Z")

</div>

What is the easiest way to query many tuples with composite key in ROM SQL? Given a dataset with say (product\_id, position) and an array of tuples \[ { product\_id: 10, position: 1}, { product\_id: 11, position: 2} \] …

---

## [What is the best way to solve following association-scenario?](https://discourse.rom-rb.org/t/what-is-the-best-way-to-solve-following-association-scenario/477)

<div class="topic-metadata">

**Author:** [@wuarmin](https://discourse.rom-rb.org/u/wuarmin)\
**Replies:** 0\
**Last updated:** [September 2, 2021, 9:51am UTC](https://discourse.rom-rb.org/t/what-is-the-best-way-to-solve-following-association-scenario/477 "2021-09-02T09:51:52Z")

</div>

Hello, I have following tables: main-table records (id, source\_name, source\_id, …), i.e. \[{15, “source\_one”, 89}, {16, “source\_two”, 89\] source-tables source\_one\_records (id, …) source\_two\_records (id, …) Every re…

---

## [Dry-effects + rom-factory?](https://discourse.rom-rb.org/t/dry-effects-rom-factory/475)

<div class="topic-metadata">

**Author:** [@ianks](https://discourse.rom-rb.org/u/ianks)\
**Replies:** 1\
**Last updated:** [July 21, 2021, 6:11am UTC](https://discourse.rom-rb.org/t/dry-effects-rom-factory/475 "2021-07-21T06:11:18Z")

</div>

Oftentimes, when building entities in rom-factory, I would like to have a shared entity for different factories. This way, all of the corresponding factories can re-use the same entity: with\_associations(user: Factory\[…

---

## [The border between database abstraction layer and business logic](https://discourse.rom-rb.org/t/the-border-between-database-abstraction-layer-and-business-logic/474)

<div class="topic-metadata">

**Author:** [@enjaku](https://discourse.rom-rb.org/u/enjaku)\
**Replies:** 1\
**Last updated:** [June 26, 2021, 4:21pm UTC](https://discourse.rom-rb.org/t/the-border-between-database-abstraction-layer-and-business-logic/474 "2021-06-26T16:21:06Z")

</div>

Hello, everyone. I have a question about the architecture and where to put my code. The problem is I don’t have much experience with anything other than ActiveRecord and Rails, but I really would like to learn. As far a…

---

## [Multiple configurations in a container](https://discourse.rom-rb.org/t/multiple-configurations-in-a-container/336)

<div class="topic-metadata">

**Author:** [@ianks](https://discourse.rom-rb.org/u/ianks)\
**Replies:** 7\
**Last updated:** [June 23, 2021, 9:17am UTC](https://discourse.rom-rb.org/t/multiple-configurations-in-a-container/336 "2021-06-23T09:17:22Z")

</div>

Say I had two rom configurations: http\_configuration = ROM::Configuration.new(:http, { uri: 'http://jsonplaceholder.typicode.com', headers: { Accept: 'application/json' }, handlers: :json }) sql\_configurati…

---

## [Ordering many-to-many relations](https://discourse.rom-rb.org/t/ordering-many-to-many-relations/470)

<div class="topic-metadata">

**Author:** [@Morozzzko](https://discourse.rom-rb.org/u/Morozzzko)\
**Replies:** 9\
**Last updated:** [June 9, 2021, 7:56am UTC](https://discourse.rom-rb.org/t/ordering-many-to-many-relations/470 "2021-06-09T07:56:22Z")

</div>

I have a many-to-many relation between two entities. The join table has a field called position, which is supposed to be used for ordering. Example: class Film \< Relation\[:sql\] associations do has\_many :actors, t…

---

## [Does/Will rom-elasticsearch support elasticsearch 7?](https://discourse.rom-rb.org/t/does-will-rom-elasticsearch-support-elasticsearch-7/468)

<div class="topic-metadata">

**Author:** [@nicrou](https://discourse.rom-rb.org/u/nicrou)\
**Replies:** 4\
**Last updated:** [June 5, 2021, 9:19am UTC](https://discourse.rom-rb.org/t/does-will-rom-elasticsearch-support-elasticsearch-7/468 "2021-06-05T09:19:52Z")

</div>

Well the title is pretty much the question. Right now from what I can see there is a dependency to 6. Are there any breaking changes blocking the upgrade?

---

## [Commands on repos vs changesets on relations](https://discourse.rom-rb.org/t/commands-on-repos-vs-changesets-on-relations/466)

<div class="topic-metadata">

**Author:** [@ineu](https://discourse.rom-rb.org/u/ineu)\
**Replies:** 3\
**Last updated:** [May 27, 2021, 8:33am UTC](https://discourse.rom-rb.org/t/commands-on-repos-vs-changesets-on-relations/466 "2021-05-27T08:33:16Z")

</div>

As stated in How do you set timestamps in version 4.0? - #7 by buszu, since v4 changesets are available directly on relations. The documentation at ROM - Commands says: For consistency, you should consider using change…

---

## [Authorisation & Scopes](https://discourse.rom-rb.org/t/authorisation-scopes/464)

<div class="topic-metadata">

**Author:** [@DangerDawson](https://discourse.rom-rb.org/u/DangerDawson)\
**Replies:** 14\
**Last updated:** [May 25, 2021, 7:41am UTC](https://discourse.rom-rb.org/t/authorisation-scopes/464 "2021-05-25T07:41:50Z")

</div>

I am going to implement authorisation within a Hanami project and I am looking how best to implement scoping with the Repository / Entity model, and instead of re-inventing the wheel I was hoping someone else had done so…

---

## [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…

---

## [How to change log level of SQL queries?](https://discourse.rom-rb.org/t/how-to-change-log-level-of-sql-queries/457)

<div class="topic-metadata">

**Author:** [@paddor](https://discourse.rom-rb.org/u/paddor)\
**Replies:** 2\
**Last updated:** [April 30, 2021, 8:57pm UTC](https://discourse.rom-rb.org/t/how-to-change-log-level-of-sql-queries/457 "2021-04-30T20:57:13Z")

</div>

Instead of INFO, I want to have them logged as DEBUG. Since I guess it’s Sequel doing the logging, I guess I have to access the Sequel::Database object used, to call .sql\_log\_level = :debug on it. Where is that database…

---

## [Custom commands to use with repository's commands macro](https://discourse.rom-rb.org/t/custom-commands-to-use-with-repositorys-commands-macro/451)

<div class="topic-metadata">

**Author:** [@lowski](https://discourse.rom-rb.org/u/lowski)\
**Replies:** 8\
**Last updated:** [April 22, 2021, 3:18pm UTC](https://discourse.rom-rb.org/t/custom-commands-to-use-with-repositorys-commands-macro/451 "2021-04-22T15:18:09Z")

</div>

Hi there! I’ve been going through commands guide, but I can’t find a any info on how to build a generic command that can be registered on a repository similarly to built-in create, update, and delete commands. Is it pos…

---

## [ROM Attribute identity](https://discourse.rom-rb.org/t/rom-attribute-identity/455)

<div class="topic-metadata">

**Author:** [@alex-lairan](https://discourse.rom-rb.org/u/alex-lairan)\
**Replies:** 2\
**Last updated:** [April 22, 2021, 7:13am UTC](https://discourse.rom-rb.org/t/rom-attribute-identity/455 "2021-04-22T07:13:50Z")

</div>

Hi, There is a way in ROM to deal with identities? Sometimes I play with monads to create my queries and I finish with things like that : filter1 : ROM::SQL::Attribute filter2 : ROM::SQL::Attribute maybe\_filter3 : May…

---

## [LDAP support for ROM](https://discourse.rom-rb.org/t/ldap-support-for-rom/384)

<div class="topic-metadata">

**Author:** [@abhas](https://discourse.rom-rb.org/u/abhas)\
**Replies:** 3\
**Last updated:** [April 19, 2021, 12:46pm UTC](https://discourse.rom-rb.org/t/ldap-support-for-rom/384 "2021-04-19T12:46:08Z")

</div>

Dear ROM community, I just discovered ROM a few minutes back and I already find the whole idea of ROM extremely sensible and useful. I would like to build LDAP support for it so that I can use ROM with OpenLDAP. I curre…

---

## [State of documentation survey](https://discourse.rom-rb.org/t/state-of-documentation-survey/446)

<div class="topic-metadata">

**Author:** [@ianks](https://discourse.rom-rb.org/u/ianks)\
**Replies:** 0\
**Last updated:** [March 25, 2021, 1:24pm UTC](https://discourse.rom-rb.org/t/state-of-documentation-survey/446 "2021-03-25T13:24:04Z")

</div>

:wave: folks! I’m preparing some questions for a survey to get some information about opportunities to improve the ROM docs. All questions will be a simple likert scale (i.e strongly agree to strongly disagree) Here’s …

---

## [ROM-HTTP: Error handling](https://discourse.rom-rb.org/t/rom-http-error-handling/444)

<div class="topic-metadata">

**Author:** [@drqCode](https://discourse.rom-rb.org/u/drqCode)\
**Replies:** 2\
**Last updated:** [March 20, 2021, 10:32am UTC](https://discourse.rom-rb.org/t/rom-http-error-handling/444 "2021-03-20T10:32:51Z")

</div>

Hi! I know there is no error schema support or anything related to API errors, but how to approach errors with ROM-HTTP? For example when creating a resource: POST /users with some attributes, resulting a 400 Bad reques…

---

## [Coercing attributes to different names](https://discourse.rom-rb.org/t/coercing-attributes-to-different-names/443)

<div class="topic-metadata">

**Author:** [@pmackay](https://discourse.rom-rb.org/u/pmackay)\
**Replies:** 1\
**Last updated:** [March 10, 2021, 9:19am UTC](https://discourse.rom-rb.org/t/coercing-attributes-to-different-names/443 "2021-03-10T09:19:17Z")

</div>

I am using rom-http and trying to map HTTP resources into storage-agnostic Struct classes. Is there a way to coerce attribute names from their name provided by the HTTP API into a different name that is used in the data …

---

## [Deep join, where clauses, and demeter principles](https://discourse.rom-rb.org/t/deep-join-where-clauses-and-demeter-principles/431)

<div class="topic-metadata">

**Author:** [@alex-lairan](https://discourse.rom-rb.org/u/alex-lairan)\
**Replies:** 4\
**Last updated:** [February 15, 2021, 9:51am UTC](https://discourse.rom-rb.org/t/deep-join-where-clauses-and-demeter-principles/431 "2021-02-15T09:51:33Z")

</div>

Hello everyone, I am looking to split my code from one “god” relation into related relations. The split would help reliability and composability. I will use an example with Animals, Classifications, and Categories. c…

---

## [How to implement authentication and paging on top of rom-http?](https://discourse.rom-rb.org/t/how-to-implement-authentication-and-paging-on-top-of-rom-http/243)

<div class="topic-metadata">

**Author:** [@srpouyet](https://discourse.rom-rb.org/u/srpouyet)\
**Replies:** 6\
**Last updated:** [February 9, 2021, 5:37am UTC](https://discourse.rom-rb.org/t/how-to-implement-authentication-and-paging-on-top-of-rom-http/243 "2021-02-09T05:37:34Z")

</div>

Hi, I’m building an adapter for a specific API on top of rom-http. I’ve got it working to the point of making requests, but now I hit the proverbial wall. The API implements a simple paging mechanism. On \> 60 results a…

---

## [Error while connecting to local DB using Ruby ROM with Sinatra](https://discourse.rom-rb.org/t/error-while-connecting-to-local-db-using-ruby-rom-with-sinatra/429)

<div class="topic-metadata">

**Author:** [@pranay414](https://discourse.rom-rb.org/u/pranay414)\
**Replies:** 1\
**Last updated:** [February 4, 2021, 5:54am UTC](https://discourse.rom-rb.org/t/error-while-connecting-to-local-db-using-ruby-rom-with-sinatra/429 "2021-02-04T05:54:47Z")

</div>

I’m fairly new to Sinatra and trying to connect to my database and using Ruby ROM gem for this. However, I’m always getting the following error message when I’m trying to execute my rake task: ArgumentError: URIs without…

---

## [ROM Gateways and sequel pools](https://discourse.rom-rb.org/t/rom-gateways-and-sequel-pools/377)

<div class="topic-metadata">

**Author:** [@renatolond](https://discourse.rom-rb.org/u/renatolond)\
**Replies:** 4\
**Last updated:** [February 4, 2021, 5:46am UTC](https://discourse.rom-rb.org/t/rom-gateways-and-sequel-pools/377 "2021-02-04T05:46:17Z")

</div>

Hi :slight\_smile: I’ve been using ROM in a multi-threaded app following the recommendation I found in one of the issues, this one: https://github.com/rom-rb/rom-sql/issues/309#issuecomment-384890852 Meaning, at the ver…

---

## [Upgrading code base from dm-rails](https://discourse.rom-rb.org/t/upgrading-code-base-from-dm-rails/414)

<div class="topic-metadata">

**Author:** [@IBLoud](https://discourse.rom-rb.org/u/IBLoud)\
**Replies:** 3\
**Last updated:** [January 26, 2021, 5:36am UTC](https://discourse.rom-rb.org/t/upgrading-code-base-from-dm-rails/414 "2021-01-26T05:36:40Z")

</div>

I am working on getting this code up and running - UrbanAlienAdventures/gamesprout: A gift from Jesse Schell (github.com) I’ve traced dm-rails to datamapper/dm-rails: Integrate DataMapper with Rails 3 (github.com) and t…

---

## [Status of transproc inside rom?](https://discourse.rom-rb.org/t/status-of-transproc-inside-rom/411)

<div class="topic-metadata">

**Author:** [@butsjoh](https://discourse.rom-rb.org/u/butsjoh)\
**Replies:** 3\
**Last updated:** [January 25, 2021, 8:05am UTC](https://discourse.rom-rb.org/t/status-of-transproc-inside-rom/411 "2021-01-25T08:05:03Z")

</div>

Hi, I am asking this question cause i have been trying to upgrade our application which uses rom to ruby 3.0. A since there are some breaking changes related to keyword argument usage i am wondering if this is not relat…

---

## [Help with registering commands (ROM::CommandRegistry)](https://discourse.rom-rb.org/t/help-with-registering-commands-rom-commandregistry/410)

<div class="topic-metadata">

**Author:** [@wulymammoth](https://discourse.rom-rb.org/u/wulymammoth)\
**Replies:** 1\
**Last updated:** [January 7, 2021, 9:12am UTC](https://discourse.rom-rb.org/t/help-with-registering-commands-rom-commandregistry/410 "2021-01-07T09:12:03Z")

</div>

I’m making attempts to bring rom-cassandra up to date and I’ve been stuck digging through rom-core source for two days and can’t seem to figure it out. While rom-cassandra is fairly outdated (last updated in 2015), the …

---

## [Rom-http: Gateway and Dataset URI paths](https://discourse.rom-rb.org/t/rom-http-gateway-and-dataset-uri-paths/407)

<div class="topic-metadata">

**Author:** [@dchandekstark](https://discourse.rom-rb.org/u/dchandekstark)\
**Replies:** 4\
**Last updated:** [January 6, 2021, 2:53pm UTC](https://discourse.rom-rb.org/t/rom-http-gateway-and-dataset-uri-paths/407 "2021-01-06T14:53:49Z")

</div>

Hi, I am delving into rom-rb with particular interest in rom-http for interacting with a web service. I noticed that the default behavior of the JSON request handler clobbers the path of the dataset URI with dataset.ab…

---

## [Cassandra/ScyllaDB adapter anyone?](https://discourse.rom-rb.org/t/cassandra-scylladb-adapter-anyone/409)

<div class="topic-metadata">

**Author:** [@wulymammoth](https://discourse.rom-rb.org/u/wulymammoth)\
**Replies:** 2\
**Last updated:** [December 28, 2020, 6:38pm UTC](https://discourse.rom-rb.org/t/cassandra-scylladb-adapter-anyone/409 "2020-12-28T18:38:01Z")

</div>

This is a shot in the dark, but I’ve been spending the last week trying to bring all the dependencies for rom-cassandra up to date. I’ve managed to do so with very little changes. However, I cannot get the commands to wo…

---

## [Create returns nil for non-int primary key](https://discourse.rom-rb.org/t/create-returns-nil-for-non-int-primary-key/402)

<div class="topic-metadata">

**Author:** [@Jammjammjamm](https://discourse.rom-rb.org/u/Jammjammjamm)\
**Replies:** 1\
**Last updated:** [December 28, 2020, 8:35am UTC](https://discourse.rom-rb.org/t/create-returns-nil-for-non-int-primary-key/402 "2020-12-28T08:35:41Z")

</div>

I need to generate random strings (a UUID in this example) as primary keys: require ‘sqlite3’ require ‘rom’ require ‘rom-sql’ require ‘rom-repository’ require ‘pry’ rom = ROM.container(:sql, 'sqlite::memory', logge…

[Previous page](https://discourse.rom-rb.org/latest.md?page=2)

[Next page](https://discourse.rom-rb.org/latest.md?page=4)
