Merge pull request #392 from SyncrowIOT/temp-product-relation-fixes

Remove unique constraint on subspace and product in SubspaceProductAllocationEntity; update product relation to nullable in NewTagEntity
This commit is contained in:
faris Aljohari
2025-06-02 06:20:03 +03:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ import { AbstractEntity } from '@app/common/modules/abstract/entities/abstract.e
import { SubspaceProductAllocationDto } from '../../dtos/subspace-product-allocation.dto';
@Entity({ name: 'subspace_product_allocation' })
@Unique(['subspace', 'product'])
// @Unique(['subspace', 'product'])
export class SubspaceProductAllocationEntity extends AbstractEntity<SubspaceProductAllocationDto> {
@Column({
type: 'uuid',

View File

@ -25,7 +25,7 @@ export class NewTagEntity extends AbstractEntity<NewTagDto> {
name: string;
@ManyToOne(() => ProductEntity, (product) => product.newTags, {
nullable: false,
nullable: true,
onDelete: 'CASCADE',
})
public product: ProductEntity;