Skip to content
This repository was archived by the owner on Apr 13, 2022. It is now read-only.
This repository was archived by the owner on Apr 13, 2022. It is now read-only.

Objects retrieved from Fabric should be mapped to ConvectorModels in terms of their keys #106

Description

@DanielKillenberger

The problem

Functions on retrieved instances derived from a ConvectorModel like history and query promise to return an instance of a defined ConvectorModel. For example history(): Promise<History<T>[]>;
The Template T is as I understand it a model extending ConvectorModel.
Instead of returning an object of type T it returns an object where every key has the prefix '_' to the keys defined in T.

Current Behavior

history(): Promise<History<T>[]> does not return Promise<History<T>[]> but Promise<History<T2>[]> where T2 has '_' as the prefix to every key defined in T.

Expected Behavior

history(): Promise<History<T>[]> should actually return Promise<History<T>[]>

I think this is because those functions call the chaincode and just return the object returned from hyperledger fabric (I therefore suspect that all values are strings too). My expectation would be that the returned object would be cast to the specified ConvectorModel.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfabricFabric related issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions