Skip to content
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

Support for Array of Array of Json Object in model properties #4132

Closed
PRAKASH-SIVAGURUNATHAN opened this issue Feb 7, 2019 · 8 comments
Closed

Comments

@PRAKASH-SIVAGURUNATHAN
Copy link

We have a model as shown below

{
  "name": "accounts",
  "plural": "accounts",
  "base": "PersistedModel",
  "idInjection": true,
  "options": {
    "validateUpsert": true
  },
  "properties": {
    "name": {
      "type": "string"
    },
    "items": {
      "type" : [
        [
          {"itemname": {"type": "string"}}
        ]
      ]
    }
  },
  "validations": [],
  "relations": {},
  "acls": [],
  "methods": {}
}

Loopback explorer show the below structure
screen shot 2019-02-07 at 5 07 37 pm

but during runtime operations the response of the items is not coming as array of array of json object as shown below

screen shot 2019-02-07 at 5 09 07 pm

@dhmlau
Copy link
Member

dhmlau commented Feb 28, 2019

@hacksparrow, the PR has landed. Is this issue good to close? Thanks.

@dhmlau
Copy link
Member

dhmlau commented Feb 28, 2019

The fix is in loopback-datasource-juggler@4.6.0.

@dhmlau dhmlau closed this as completed Feb 28, 2019
@hacksparrow
Copy link
Member

This one's not fixed. This is the List breaker.

@dhmlau
Copy link
Member

dhmlau commented Apr 8, 2019

@PRAKASH-SIVAGURUNATHAN, @hacksparrow has fixed it in master and 3.x. Closing this issue as resolved. Thanks.

@dhmlau dhmlau closed this as completed Apr 8, 2019
@dhmlau dhmlau added this to the March 2019 milestone milestone Apr 8, 2019
@snarjuna
Copy link

snarjuna commented Apr 9, 2019

@dhmlau @hacksparrow Can we get this fix in version 2.x. cc: @bajtos

@dhmlau
Copy link
Member

dhmlau commented Apr 10, 2019

@snarjuna , we had a very brief chat with @PRAKASH-SIVAGURUNATHAN and indicated that the codebase is a bit different in 2.x than in 3.x/master. @hacksparrow did some investigation and it would be a huge effort to have it fixed in 2.x as well. If your team is planning to move to a recent version in 2 months or so (there had been some conversation about that with @RobPhippen as well), it may not worth the effort to do so.

@bajtos
Copy link
Member

bajtos commented Apr 18, 2019

it may not worth the effort to do so.

+1

Especially considering that LoopBack 2.x is going end of life in about two weeks (at the end of April 2019), see https://github.com/strongloop/loopback#module-long-term-support-policy.

@snarjuna
Copy link

@dhmlau @bajtos Thanks for details. I will check with team and come back.

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

No branches or pull requests

5 participants