[DOCS-8081] Polymrophism in "mongodb-ecosystem/tutorial/mongoid-relations.txt" needs more details Created: 10/Jun/16  Updated: 10/Mar/20  Resolved: 10/Mar/20

Status: Closed
Project: Documentation
Component/s: drivers
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: collector-298ba4e7, docs-triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Location: https://docs.mongodb.com/ecosystem/tutorial/mongoid-relations/
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
Referrer: https://docs.mongodb.com/ecosystem/tutorial/ruby-mongoid-tutorial/
Screen Resolution: 1536 x 864


Participants:
Days since reply: 3 years, 48 weeks, 1 day ago

 Description   

Polymorphic relations : you should explain what is the name of the field used to desambiguate ploymorphic relations, and what value is given to that field. I believe I had overriden this field in my code and it caused huge problems



 Comments   
Comment by Christopher Cho [ 10/Mar/20 ]

Thanks, closing!

Comment by Oleg Pudeyev (Inactive) [ 10/Mar/20 ]

I think this ticket can be closed.

There is insufficient information to be able to take action, specifically association name, field name that caused problems, Mongoid version are missing.

In general in the Rails ecosystem it is decently common for the framework to implement a number of related methods with names derived from what the user specified explicitly; this needs to be accounted for by developers to ensure there are no conflicts.

Comment by Christopher Cho [ 10/Mar/20 ]

oleg.pudeyev is this still relevant?

 

 

The doc is now located at https://docs.mongodb.com/mongoid/current/tutorials/mongoid-relations/

and appears to explain how to enable polymorphic associations:

To define a polymorphic association, specify the polymorphic: true option on the child association and add the as: :association_name option to the parent association.

Generated at Thu Feb 08 07:55:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.