Skip to content

Query for chained parameters to the same Resource #117

@lukeaduncan

Description

@lukeaduncan

Resources like Location and Organization have a partOf field that is a Reference to the same type of resource. I don't see how to pass that information in the genChainedParamQuery function.

For example, for Organization you can use partof.identifier for a chained query. But I don't know what to put for the chainedModule instance since it refers to itself which hasn't finished loading yet. I tried "this" and "module" with no luck. I also tried doing it the same as the others by requiring itself and creating an instance.

So what can you put for HERE:

queryUtils.genChainedParamQuery(queryObject['partof.identifier'][constants.NO_MODIFER], 'partof.reference', 'identifier', HERE, (err, clause) => { })

Or does this just have to be done in some completely separate way. I could duplicate the resource module without the chained parameters and the use that, but that seems excessive and then requires two files to be updated when other parameters are changed so it doesn't seem ideal.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions