Serializes the collection items to plain JSON objects. Returns an empty array if not initialized.
()
| 225 | |
| 226 | /** Serializes the collection items to plain JSON objects. Returns an empty array if not initialized. */ |
| 227 | toJSON<TT extends T>(): EntityDTO<TT>[] { |
| 228 | if (!this.isInitialized()) { |
| 229 | return []; |
| 230 | } |
| 231 | |
| 232 | return this.toArray(); |
| 233 | } |
| 234 | |
| 235 | /** Adds one or more items to the collection, propagating the change to the inverse side. Returns the number of items added. */ |
| 236 | add<TT extends T>( |
nothing calls this directly
no test coverage detected