New issue
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
insertMany is not reading schema
option
#4424
Comments
The option should be taken into account only for POJOs, so const customers = await em.insertMany(CustomerEntity, [{}, {}], { schema: '...' }); Alternative to that would be: const customers = [em.create(CustomerEntity, {}, { schema: '...' }), em.create(CustomerEntity, {}, { schema: '...' })];
await em.insertMany(customers); // no need to specify the entity type with entity instances Let me know if that works. |
@B4nan this didn't work for me, |
Sorry, it's |
I tried it today and it worked with plain JS objects. Closing this issue. |
I actually changed my mind on this, planing to change this in v6 so the |
Great |
Fixed in v6 via e929c30?w=1 |
Describe the bug
If I try to use
EntityManager.insertMany
method, with{ schema: "<<runtime calculated valid schema>>" }
, the schema option is ignoreStack trace
To Reproduce
Steps to reproduce the behavior:
*
, e.g.:CustomerEntity
const customers = [new CustomerEntity(), new CustomerEntity()]
em.insertMany(CustomerEntity, customers, { schema: "<<runtime calculated valid schema>>" })
Expected behavior
This should insert all customers with the given schema
Versions
The text was updated successfully, but these errors were encountered: