Skip to content

Rails 5 NoMethodError: undefined method `cast_type'  #777

@riyengar8

Description

@riyengar8

My apologies for opening this as an "issue"; I'm posting here in hopes of learning enough to be useful in the effort to add rails 5 support to this gem.

When I run the test suite in the rails5 branch. I see a bunch of failures that look something like this:

 NoMethodError:
        undefined method `cast_type' for #<ActiveRecord::Relation::QueryAttribute:0x00000002dcf238>

When I look through the stack traces, I can see that what is getting passed down to this method from ActiveRecord is no longer an instance of OracleEnhancedColumn as it seems to expect, but is instead generally an instance of Relation::QueryAttribute.

I also see that the constructor for Column has changed significantly and now includes a new SqlTypeMetadata component. This seems to be an important (and major) change.

I also see a couple of commits in the Rails 5 line of development that seem to have something to do with this:
rails/rails@b06f64c
rails/rails@158c7eb#diff-ece1d9e4cf3db41b2c394e2acfcc2330

Those rather vague observations about what's broken and why are about as far as I can get.

I'd love to do something here to help with Rails 5 support, but I don't seem to understand enough about the architecture of the OEA or what a Rails 5 connection adapter is supposed to look like well enough to be productive.

So, if there's anyone out there who has an idea for what work needs to be done to support Rails 5 and is willing to briefly explain some piece of it to me at a high level so that I can work on it, I would really appreciate it.

I understand that may be harder than just doing the work yourself, so no worries if you don't have time for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions