Skip to content

Commit 956a64d

Browse files
claude[bot]ymc9
andcommitted
fix(test): correct delegate discriminator enum values to match model names
- Change DataType enum from TEXT/NUMBER to DataText/DataNumber - Remove explicit dataType field from test as it's auto-set by delegate discriminator - Fixes MySQL test failure: delegate discriminators must use model names Co-authored-by: Yiming Cao <ymc9@users.noreply.github.com>
1 parent ffa1720 commit 956a64d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/regression/test/issue-2351.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ type BaseEntity {
1515
}
1616
1717
enum DataType {
18-
TEXT
19-
NUMBER
18+
DataText
19+
DataNumber
2020
}
2121
2222
model RoutineData with BaseEntity {
@@ -63,7 +63,7 @@ model DataText extends RoutineData {
6363

6464
const authDb = db.$setAuth({ id: user.id });
6565
const created = await authDb.dataText.create({
66-
data: { textValue: 'hello', routineId: routine.id, dataType: 'TEXT' },
66+
data: { textValue: 'hello', routineId: routine.id },
6767
});
6868
expect(created.textValue).toBe('hello');
6969
expect(created.isDeleted).toBe(false);

0 commit comments

Comments
 (0)