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 many_many is not working #8115

Closed
lekoala opened this issue May 31, 2018 · 6 comments
Closed

Polymorphic many_many is not working #8115

lekoala opened this issue May 31, 2018 · 6 comments

Comments

@lekoala
Copy link
Contributor

lekoala commented May 31, 2018

Affected Version

4.1.1

Description

I tried to use the Polymorphic many_many feature. Although advertised as experimental, I would expect it to work. As far as I can tell, it doesn't.

Steps to Reproduce

Result : [Emergency] Uncaught InvalidArgumentException: many_many through relation SomeObject.Tags from references a polymorphic field TagMapping::Parent which is not supported

@kinglozzer
Copy link
Member

As far as I’m aware, that functionality isn’t in a stable release yet

@lekoala
Copy link
Contributor Author

lekoala commented May 31, 2018

Then the docs are a bit misleading, since they currently say this:

Note, that this feature is currently experimental, and has certain limitations:

This feature only works with many_many through
This feature will only allow polymorphic many_many, but not belongs_many_many. However, you can have a has_many relation to the mapping table on this side, and iterate through this to collate parent records.

I would qualify as "to be released" or something else. Experimental is more like : "it works, but we haven't covered all use cases yet".

@kinglozzer
Copy link
Member

Yep, agreed they can be misleading at the moment. That’s being tracked here silverstripe/doc.silverstripe.org#175, so I’ll close this issue :)

@tractorcow
Copy link
Contributor

Yes it's only in 4.2.0 onwards.

We no longer have separate sets of documentation for each line of release since it was a maintenance burden. Sorry that you got bit by that!

@lekoala
Copy link
Contributor Author

lekoala commented Jun 7, 2018

Maybe it's just a matter of specifying in the docs for which version the feature is available if it's a new feature introduced in the same line of release. Like : polymorphic many-many (since 4.2)

Anyways, I hope to see 4.2 soon because polymorphic many many would be really helpful!

@tractorcow
Copy link
Contributor

Well one thing we were thinking about is updating the docs server to ONLY display tagged docs, rather than whatever is currently on the branch.

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

3 participants