dependabot[bot] on bundler
dependabot[bot] on bundler
Bump rack from 2.2.3 to 2.2.6.2… (compare)
repobot-file-sync[bot] on main
Update .repobot.yml from rom-rb… (compare)
solnic on main
Update and rename .action_hero.… (compare)
flash-gordon on master
Upgrade ROM-yaml Merge pull request #17 from Int… (compare)
dependabot[bot] on npm_and_yarn
Bump qs from 6.5.2 to 6.5.3 Bu… (compare)
tasks
in order to combine based on composite key?class Users < ROM::Relation[:sql]
schema do
attribute :user_id, Types::Int
attribute :other_user_id, Types::Int
primary_key :user_id, :other_user_id
associations do
has_many :tasks
end
end
end
class Tasks < ROM::Relation[:sql]
schema do
attribute :user_id, Types::ForeignKey(:users)
attribute :other_user_id, Types::ForeignKey(:users)
end
end
users.combine(:tasks).to_a # this result in a '... INNER JOIN users ON users.user_id = tasks.user_id WHERE ...'
has_many tasks, foreign_key: [:user_id, :other_user_id]
@v-kolesnikov how do you setup ?
I have this error on rails c
:
https://pastebin.com/CALmeDiP (too big for gitter)
tldr: uninitialized constant Int
Traceback (most recent call last):
11: from main.rb:1:in `<main>'
10: from main.rb:1:in `require'
9: from /home/necros/.rvm/gems/ruby-2.6.0/gems/rom-3.3.3/lib/rom.rb:14:in `<top (required)>'
8: from /home/necros/.rvm/gems/ruby-2.6.0/gems/rom-3.3.3/lib/rom.rb:14:in `require'
7: from /home/necros/.rvm/gems/ruby-2.6.0/gems/rom-3.3.3/lib/rom/relation.rb:5:in `<top (required)>'
6: from /home/necros/.rvm/gems/ruby-2.6.0/gems/rom-3.3.3/lib/rom/relation.rb:5:in `require'
5: from /home/necros/.rvm/gems/ruby-2.6.0/gems/rom-3.3.3/lib/rom/relation/class_interface.rb:8:in `<top (required)>'
4: from /home/necros/.rvm/gems/ruby-2.6.0/gems/rom-3.3.3/lib/rom/relation/class_interface.rb:8:in `require'
3: from /home/necros/.rvm/gems/ruby-2.6.0/gems/rom-3.3.3/lib/rom/relation/curried.rb:7:in `<top (required)>'
2: from /home/necros/.rvm/gems/ruby-2.6.0/gems/rom-3.3.3/lib/rom/relation/curried.rb:8:in `<module:ROM>'
1: from /home/necros/.rvm/gems/ruby-2.6.0/gems/rom-3.3.3/lib/rom/relation/curried.rb:9:in `<class:Relation>'
/home/necros/.rvm/gems/ruby-2.6.0/gems/rom-3.3.3/lib/rom/relation/curried.rb:17:in `<class:Curried>': uninitialized constant #<Module:0x000055ba132ea0b8>::Int (NameError)
source 'https://rubygems.org'
gem 'rom'
gem 'rom-mongo'
gem 'pry'
require "rom"
require "rom-mongo"
rom = ROM.container(:mongo, 'mongodb://localhost:27017/plezi_development')
.or
combine(:regions)
on the relation produces that error, but only when view
is set. I see someone had this issue in 2017 but I'm not sure if it was ever resolved. I'm on ROM 4.2.1