Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polymorphic columns do not work #148

Open
wizardofosmium opened this issue Mar 23, 2022 · 1 comment
Open

Polymorphic columns do not work #148

wizardofosmium opened this issue Mar 23, 2022 · 1 comment

Comments

@wizardofosmium
Copy link

For a model such as

class Icon

  include MotionModel::Model
  include MotionModel::ArrayModelAdapter
  
  columns(
    name: :string
  )
  
  belongs_to :record, polymorphic: true
  
end

The following raises a classify exception:

widget = Widget.create
gadget = Gadget.create
icon = Icon.create

icon.record
icon.record = widget
icon.record
icon.record = gadget

because belongs_to_relation assumes you can always classify the column, but the column specifically raises an exception when trying to classify a polymorphic column.

@sxross
Copy link
Owner

sxross commented Mar 24, 2022

I just don’t know that we ever put much into polymorphic columns. I’ll be honest: I don’t even have a current RubyMotion license, so I would not be in a place to work on this. Would you be interested in moving this project forward?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants