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

Multiple table declarations in JSON array with model #5

Open
netbofia opened this issue Jun 29, 2018 · 0 comments
Open

Multiple table declarations in JSON array with model #5

netbofia opened this issue Jun 29, 2018 · 0 comments

Comments

@netbofia
Copy link
Member

formatRetreivedData
Fix it so that the JSON array structure doesn't need a _table when pushing objects inside

crops:[{
   _table:["Crop","ObservationVariable","StudyObservationVariable","Study","Trial","Program"],
   _model:{
     _table:"Program",
     name:"",
     abbreviation:"",
     objective: "",
     honorific:{_table:"Person"},
     leadPerson:{_table:"Person",_attribute:"name"}
   }
crops:[{
    _model:{
      _table:["Crop","ObservationVariable","StudyObservationVariable","Study","Trial","Program"],
      name:"",
      abbreviation:"",
      objective: "",
      honorific:{_table:"Person"},
      leadPerson:{_table:"Person",_attribute:"name"}
    }

The second object should suffice

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

1 participant