| 534 | |
| 535 | describe('rejectNavigationalPropertiesInData', () => { |
| 536 | class Order extends Entity { |
| 537 | static definition = new ModelDefinition('Order') |
| 538 | .addProperty('id', {type: 'string', id: true}) |
| 539 | .addRelation(<BelongsToDefinition>{ |
| 540 | name: 'customer', |
| 541 | type: RelationType.belongsTo, |
| 542 | targetsMany: false, |
| 543 | source: Order, |
| 544 | target: () => User, |
| 545 | keyFrom: 'customerId', |
| 546 | }); |
| 547 | |
| 548 | id: string; |
| 549 | customerId: string; |
| 550 | |
| 551 | customer?: User; |
| 552 | } |
| 553 | |
| 554 | it('accepts data with no navigational properties', () => { |
| 555 | rejectNavigationalPropertiesInData(Order, {id: '1'}); |
nothing calls this directly
no test coverage detected