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
Define a model with an array property, where the item type contains a buffer.
@model() export class DemoModel extends Entity { @property.array(Item) items: Item[]; } @model() export class Item extends Model { @property() buffer: Buffer; }
Store and load an instance of this model.
await this.demoModelRepository.create({items: [{buffer: Buffer.from('data')}]}); const demo = await this.demoModelRepository.findOne(); console.log(demo?.items[0].buffer.toString())
Prints nothing. The buffer in the loaded object is empty.
Prints "data".
https://github.com/leanil/array-prop-bug (Just npm start it, the observer performs the test on start.)
npm start
linux x64 16.17.0
├── @loopback/[email protected] ├── @loopback/[email protected] ├── @loopback/[email protected] ├── @loopback/[email protected] ├── @loopback/[email protected] ├── @loopback/[email protected] ├── [email protected]
Behaves the same way with 7.0.0-alpha.1. The absence of an array case around here seems suspicious to me.
7.0.0-alpha.1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Steps to reproduce
Define a model with an array property, where the item type contains a buffer.
Store and load an instance of this model.
Current Behavior
Prints nothing. The buffer in the loaded object is empty.
Expected Behavior
Prints "data".
Link to reproduction sandbox
https://github.com/leanil/array-prop-bug
(Just
npm start
it, the observer performs the test on start.)Additional information
linux x64 16.17.0
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── [email protected]
Behaves the same way with
7.0.0-alpha.1
.The absence of an array case around here seems suspicious to me.
The text was updated successfully, but these errors were encountered: