Skip to content
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

feat(core): allow adding items to not initialized collections #489

Merged
merged 1 commit into from
Apr 19, 2020

Conversation

B4nan
Copy link
Member

@B4nan B4nan commented Apr 18, 2020

Works for both 1:m and m:n collections.

const a = await orm.em.findOneOrFail(Author2, god.id);
console.log(a.books.isInitialized()); // false
const b2 = new Book2('Bible 2', a);
const b3 = new Book2('Bible 3', a);
a.books.add(b2, b3);
await orm.em.flush();

@B4nan B4nan changed the base branch from master to dev April 18, 2020 22:26
@B4nan B4nan changed the title Collection add feat(core): allow adding items to not initialized collections Apr 18, 2020
@B4nan B4nan merged commit 5249b20 into dev Apr 19, 2020
@B4nan B4nan deleted the collection-add branch April 19, 2020 07:22
@B4nan B4nan mentioned this pull request Apr 27, 2020
@B4nan B4nan mentioned this pull request Apr 30, 2020
46 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant