fix: Make tests pass on MySQl and Postgres (no-changelog) (#5005)
This commit is contained in:
committed by
GitHub
parent
e4785da2e1
commit
365ffec3b2
@@ -1,4 +1,4 @@
|
||||
import { Entity, ManyToOne, RelationId } from 'typeorm';
|
||||
import { Entity, ManyToOne, PrimaryColumn, RelationId } from 'typeorm';
|
||||
import type { CredentialsEntity } from './CredentialsEntity';
|
||||
import type { User } from './User';
|
||||
import type { Role } from './Role';
|
||||
@@ -12,6 +12,7 @@ export class SharedCredentials extends AbstractEntity {
|
||||
@ManyToOne('User', 'sharedCredentials', { primary: true })
|
||||
user: User;
|
||||
|
||||
@PrimaryColumn()
|
||||
@RelationId((sharedCredential: SharedCredentials) => sharedCredential.user)
|
||||
userId: string;
|
||||
|
||||
@@ -21,6 +22,7 @@ export class SharedCredentials extends AbstractEntity {
|
||||
})
|
||||
credentials: CredentialsEntity;
|
||||
|
||||
@PrimaryColumn()
|
||||
@RelationId((sharedCredential: SharedCredentials) => sharedCredential.credentials)
|
||||
credentialId: number;
|
||||
credentialsId: number;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Entity, ManyToOne, RelationId } from 'typeorm';
|
||||
import { Entity, ManyToOne, PrimaryColumn, RelationId } from 'typeorm';
|
||||
import type { WorkflowEntity } from './WorkflowEntity';
|
||||
import type { User } from './User';
|
||||
import type { Role } from './Role';
|
||||
@@ -12,6 +12,7 @@ export class SharedWorkflow extends AbstractEntity {
|
||||
@ManyToOne('User', 'sharedWorkflows', { primary: true })
|
||||
user: User;
|
||||
|
||||
@PrimaryColumn()
|
||||
@RelationId((sharedWorkflow: SharedWorkflow) => sharedWorkflow.user)
|
||||
userId: string;
|
||||
|
||||
@@ -21,6 +22,7 @@ export class SharedWorkflow extends AbstractEntity {
|
||||
})
|
||||
workflow: WorkflowEntity;
|
||||
|
||||
@PrimaryColumn()
|
||||
@RelationId((sharedWorkflow: SharedWorkflow) => sharedWorkflow.workflow)
|
||||
workflowId: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user