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

Fix issue with mapped fields and defaults on update #527

Merged
merged 3 commits into from
May 1, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use dedicated table object for test.
  • Loading branch information
dvictory committed Apr 30, 2023
commit 46df289958760799a6a704f835fd912380c15bb0
9 changes: 8 additions & 1 deletion src/__tests__/entity.update.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ const TestEntity3 = new Entity({
table: TestTable3
} as const)

const TestTable4 = new Table({
name: 'test-table4',
partitionKey: 'pk',
entityField: false,
DocumentClient
})

const TestEntity4 = new Entity({
name: 'TestEntity4',
autoExecute: false,
Expand All @@ -98,7 +105,7 @@ const TestEntity4 = new Entity({
test_number_default_with_map: { type: 'number', map: 'test_mapped_number', default: 0, onUpdate: false },
},
timestamps: false,
table: TestTable3
table: TestTable4
} as const)

const TestEntityGSI = new Entity({
Expand Down
Loading