Open Kobreizhyashi opened 3 years ago
No, moor does not provide apis to insert multiple entities at once. There have been similar issues requesting moor to behave more like an ORM (https://github.com/simolus3/moor/issues/114 for instance). In general I view moor as a convenient yet thin wrapper around sqlite though, not as an ORM. Given the additional complexity that would be required to support those features well, I'm rather reluctant to work on them.
So long story short, you'll have to write that code manually. In practice its not that bad since you can essentially write an upsert for each table and then call those methods inside a transaction
.
Hi !
I'm currently discovering Moor for a professionnal project and I appreciate it. I've a question about the data insertion. Actually, I'm working with tabs which contains fieldsets, which contains fields etc..etc.. Should I insert tabs, fieldsets etc.. separatly or is there any way, with Foreign keys to just call a TabDao.insert and then insert all the structure with all datas in their own tables (created from .moor files) ?
Thanks ! KBZH