Skip to content

Commit

Permalink
Port: Fix exception on creating a bidirectional link to a new resourc…
Browse files Browse the repository at this point in the history
…e to release 8
  • Loading branch information
1nf0rmagician committed Nov 21, 2024
1 parent 9050ecb commit dfa2bd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public void SetMany(IReadOnlyList<ISimpleResource> references)
public event EventHandler<ISimpleResource[]> SomeChanged;
}

public class BidirectionalReferenceResource : PublicResource
public class BidirectionalReferenceResource : Resource
{
[ResourceReference(ResourceRelationType.Extension, ResourceReferenceRole.Source, nameof(SourceReference))]
public ReferenceResource SourceReference { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ public void SaveBidirectionalReferences()
var newCollectionResource = new SimpleResource() { Name = "newCollectionResource" };
ResourceReferenceTools.InitializeCollections(newCollectionResource);
// Fill graph
_graph[1] = new ResourceWrapper(instance);
_graph[2] = new ResourceWrapper(resource);
_graph[3] = new ResourceWrapper(collectionResource);
_graph[1] = instance;
_graph[2] = resource;
_graph[3] = collectionResource;
// Set single references
instance.TargetReference = resource; // The bidirectional reference is created with an existing resource
instance.NewTargetReference = newResource; // The bidirectional reference is created with a new resource
Expand Down

0 comments on commit dfa2bd4

Please sign in to comment.