We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
findDescendants
file_system_node_entity_closure
findDescendantsTree
// include the output in code tags like these!
import { Column, Entity, JoinColumn, ManyToMany, ManyToOne, OneToMany, PrimaryGeneratedColumn, Tree, TreeChildren, TreeParent, } from 'typeorm'; import { FileSystemEntity } from './file-system.entity'; import { FileSystemNodeContentEntity } from './file-system-node-content.entity'; import { FileSystemNodeBase, FileType } from '../interface'; import { FileSystemGroupNodeEntity } from '.'; @Entity() @Tree('closure-table') export class FileSystemNodeEntity extends FileSystemNodeBase { @PrimaryGeneratedColumn('uuid') override id!: string; @TreeChildren({ cascade: ['insert', 'update'] }) override children!: FileSystemNodeEntity[]; @TreeParent() override parent!: FileSystemNodeEntity; @Column() override icon!: string; @Column() override defaultIcon!: boolean; @Column() override name!: string; @Column('simple-enum') override type!: FileType; @ManyToOne(() => FileSystemNodeContentEntity) @JoinColumn({ name: 'fileSystemNodeContentId' }) fileSystemNodeContent?: FileSystemNodeContentEntity | null; @Column({ name: 'fileSystemNodeContentId', nullable: true }) override fileSystemNodeContentId?: string | null; @ManyToOne(() => FileSystemEntity, { onDelete: 'CASCADE' }) fileSystem!: FileSystemEntity; @ManyToMany(() => FileSystemEntity, (type) => type.fileSystemNodeList, {}) fileSystemList!: FileSystemEntity[]; @OneToMany( () => FileSystemGroupNodeEntity, (type) => type.fileSystemNodeEntity, {}, ) fileSystemGroupList?: FileSystemGroupNodeEntity[]; @ManyToOne(() => FileSystemNodeEntity, (type) => type.id, { deferrable: 'INITIALLY DEFERRED', onDelete: 'SET NULL', cascade: true, }) @JoinColumn({ name: 'prevId' }) prev?: FileSystemNodeEntity | null; @Column({ default: null, nullable: true }) prevId?: string | null; @ManyToOne(() => FileSystemNodeEntity, (type) => type.id, { deferrable: 'INITIALLY DEFERRED', onDelete: 'SET NULL', cascade: true, }) @JoinColumn({ name: 'nextId' }) next!: FileSystemNodeEntity | null; @Column({ default: null, nullable: true }) nextId?: string | null; @Column({ type: 'simple-array', default: null }) override list?: string[]; }
file_system_node_entity
aurora-mysql
aurora-postgres
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
spanner
sqlite
sqlite-abstract
sqljs
sqlserver
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Issue Description
findDescendants
method will return error datafile_system_node_entity_closure
table has error mapfindDescendantsTree
get right data( not compare data structure only data sum)Expected Behavior
findDescendants
get self and all DescendantsActual Behavior
findDescendants
get some unexpected node(I don't know why have this node ....)Steps to Reproduce
3 entity define
file_system_node_entity
show no children butfile_system_node_entity_closure
find 4 node(include self)My Environment
Additional Context
Relevant Database Driver(s)
aurora-mysql
aurora-postgres
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
spanner
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: