rom-sql icon indicating copy to clipboard operation
rom-sql copied to clipboard

Select Type Error: can't convert attribute to interval

Open abrthel opened this issue 7 years ago • 0 comments

rom v4.1.3

I ran into a similar issue to this https://discourse.hanamirb.org/t/select-clause-in-a-repository/396/4

I don't have a repo script yet but I was trying to combine two relations and edit one of the nodes, eg:

campaign_region_relation
  .join(:base_region)
  .combine(slot_templates: :slot_types)
  .node(:slot_templates) do |r|
    r.select(*r.schema.rename(slot_template_key: :key))
  end

would result in TypeError: can't convert ROM::SQL::Attribute into time interval

But change select to project and I'd get the desired output

abrthel avatar Feb 16 '18 03:02 abrthel