-
-
Notifications
You must be signed in to change notification settings - Fork 158
After enabling options.EnableResourceHooks = true; I get a NullReference on GET Articles/GetSecondary [id/relationshipName] #924
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
Comments
@bart-degreed The relation between my 2 resources is a HasOne -> image is IIdentifiable.
|
@maurei The relation is a OneToMany. When getting the secondary relation I get this error: This error is from the first if in the same function as before.
|
I just wrote a fix: |
@farturi I'll be looking into this issue tomorrow. Thanks for digging deep into it! |
@farturi I have been unable to reproduce the issue.
The scenario of one to many of this particular hook is covered in this test. Can you provide us with a repro example? |
@maurei change
|
@maurei |
@maurei https://github.com/json-api-dotnet/JsonApiDotNetCore/blob/master/src/JsonApiDotNetCore/Hooks/Internal/ResourceHookExecutorFacade.cs#L125 |
Thank you. I suspected that |
Fixes for these issues are in https://github.com/json-api-dotnet/JsonApiDotNetCore/releases/tag/v4.0.3. Thanks @woofi7, @farturi and @manuelTscholl for helping out on this. |
DESCRIPTION
The request is crashing on this line because the type is
IIdentifiable
instead of the implemented typeImage
.https://github.com/json-api-dotnet/JsonApiDotNetCore/blob/master/src/JsonApiDotNetCore/Configuration/ResourceGraph.cs#L85
The implementation seems to be lost at this place:
https://github.com/json-api-dotnet/JsonApiDotNetCore/blob/master/src/JsonApiDotNetCore/Hooks/Internal/ResourceHookExecutorFacade.cs#L131
VERSIONS USED
The text was updated successfully, but these errors were encountered: