Skip to content

[Bug]: Honor loadOnDemand in ResourceSet.Resource(...) #39

@samatstariongroup

Description

@samatstariongroup

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of the EcoreNetto
  • I have searched open and closed issues to ensure it has not already been reported

Description

  • Summary: ResourceSet.Resource(Uri uri, bool loadOnDemand) ignores loadOnDemand: it only searches existing resources and returns null when not found, never creating/loading on demand. The parameter is part of the contract but has no effect.
  • Affected files: ECoreNetto/Resource/ResourceSet.cs:146-162
  • Proposed solution: When loadOnDemand is true and no matching resource exists, create and load it (mirroring the demand-load already done in Resource.GetEObject).
  • Acceptance criteria:
    • With loadOnDemand: true, a not-yet-loaded resource is created and loaded.
    • With loadOnDemand: false, behavior is unchanged.
    • Tests cover both paths.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions