Thanks to visit codestin.com
Credit goes to github.com

Skip to content

relation to allow batch creation in 3.x #2928

@davidcheung

Description

@davidcheung

Bug or feature request

  • Bug
  • Feature request

Description of feature (or steps to reproduce if bug)

#2879 it didnt handle batchCreate for relations,
so in a scenario where POST /book/:id/page it will not inherit allowArray flag and therefore will not allowArray in 3.x's more strict coercion

related code

loopback/lib/model.js

Lines 499 to 506 in 6b6ca95

define('__create__' + relationName, {
isStatic: false,
http: { verb: 'post', path: '/' + pathName },
accepts: { arg: 'data', type: 'object', model: toModelName, http: { source: 'body' }},
description: format('Creates a new instance in %s of this model.', relationName),
accessType: 'WRITE',
returns: { arg: 'data', type: toModelName, root: true },
});

cc @bajtos

Update 18/11/16:

Update 22/11/16:

  • Functionality was changed from last week, needs review.

Update 23/11/16:

  • Still needs review.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions