jaguar_orm
jaguar_orm copied to clipboard
feature request: polymorphic relationships
Any ideas for implementing polymorphic relationships?
In active record terms, it'd be expressed like
class Teacher
has_one :schedule, as: :owner
end
class Student
has_one :schedule, as: :owner
end
class Schedule
belongs_to :owner, polymorphic: true
end
but unfortunately this relationship is particularly difficult to express at the moment.
Could you please elaborate more?