Expand returns a shallow copy of the current Record model expand data (if any).
()
| 672 | |
| 673 | // Expand returns a shallow copy of the current Record model expand data (if any). |
| 674 | func (m *Record) Expand() map[string]any { |
| 675 | if m.expand == nil { |
| 676 | // return a dummy initialized map to avoid assignment to nil map errors |
| 677 | return map[string]any{} |
| 678 | } |
| 679 | |
| 680 | return m.expand.GetAll() |
| 681 | } |
| 682 | |
| 683 | // SetExpand replaces the current Record's expand with the provided expand arg data (shallow copied). |
| 684 | func (m *Record) SetExpand(expand map[string]any) { |