dresende / node-orm2

Object Relational Mapping
http://github.com/dresende/node-orm2
MIT License
3.07k stars 376 forks source link

Batch create #736

Closed olee closed 8 years ago

olee commented 8 years ago

Hi, is there a way to create multiple entities at once other than using raw queries? I'm writing a software that often needs to create a lot of entities of the same time and would like to improve it's performance.

dxg commented 8 years ago

Pass an array to create fn

olee commented 8 years ago

This works?? It's documented nowhere! :sweat_smile: This is definitely something that should be added to the wiki!

OT: I'm also working on better Typescript typings for this library so I will add this, too. Also I managed to implement a Typescript annotation based entity model definition framework which got quite powerful and is very easy to use. I'm thinking of publishing that as well when I have some time.