# Class: Branch

## Branch()

Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple parents.

## Constructor

#### new Branch()

Source:
  - entities/branch.js, line 5

### Members

#### branchId :string

primary key

##### Type:

- string

Source:
  - entities/branch.js, line 17

#### fromSearchNote :boolean

##### Type:

- boolean

Source:
  - entities/branch.js, line 29

#### isExpanded :boolean

##### Type:

- boolean

Source:
  - entities/branch.js, line 27

#### noteId :string

##### Type:

- string

Source:
  - entities/branch.js, line 19

#### notePosition :int

##### Type:

- int

Source:
  - entities/branch.js, line 23

#### parentNoteId :string

##### Type:

- string

Source:
  - entities/branch.js, line 21

#### prefix :string

##### Type:

- string

Source:
  - entities/branch.js, line 25

### Methods

#### (async) getNote() → {NoteShort}

Source:
  - entities/branch.js, line 33

##### Returns:

Type
  NoteShort

#### getNoteFromCache() → {NoteShort}

Source:
  - entities/branch.js, line 38

##### Returns:

Type
  NoteShort

#### (async) getParentNote() → {NoteShort}

Source:
  - entities/branch.js, line 43

##### Returns:

Type
  NoteShort

#### isTopLevel() → {boolean}

Source:
  - entities/branch.js, line 48

##### Returns:

true if it's top level, meaning its parent is root note

Type
  boolean