Open skunkworker opened 1 year ago
@leonidkroka any ideas how to resolve this issue?
Just to add more context, this seems specific to JRuby and PostgreSQL. I've added JRuby 9.4/AR 7 and 9.3/AR6 6.1 to the CI tests and they are passing 🤔
@skunkworker what version of activerecord-jdbcpostgresql-adapter gem do you have installed?
@jkowens activerecord-jdbcpostgresql-adapter (61.2-java)
We haven't moved to 9.4 yet because it's not stable enough for production use.
@skunkworker I have jruby back in the CI, could you possibly create a PR with a failing test to demonstrate the issue?
@jkowens https://github.com/zdennis/activerecord-import/pull/817 I was able to reproduce this with jruby and MRI, the issue appears to occur when you have an alias_attribute :new_col, :old_col
where both columns are currently being backed in the database.
Related to https://github.com/zdennis/activerecord-import/pull/799 and https://github.com/zdennis/activerecord-import/issues/728
In my model I am aliasing an attribute, when I try to import a record from an existing record, the INSERT INTO sql string has the aliased column name twice instead of once.
Rails 6.1.7.6
activerecord-import v1.5.0
The ActiveRecord Schema cache is also being used.
Eg: