Okay, not a regression, I guess we misunderstood each other. What I meant with insertion with id at non-zero was not just forcing the insertion but forcing the insertion with the given id.
I see from test "Insert row twice" in trows that it was not the intended behaviour. If it's fine with you, I can open a PR changing force behavior when an id is present to insert with the given id field and not just performing the insertion and changing the object id. Conflict are already handled through the conflictPolicy
Inserting a model with a specific ID doesn't work.
I added this tests to
trows.nim
and it fails. I was expecting it to pass.I think this is a regression as we talked about that already inhttps://github.com/moigagoo/norm/issues/104/Okay, not a regression, I guess we misunderstood each other. What I meant with insertion with id at non-zero was not just forcing the insertion but forcing the insertion with the given id.
I see from test
"Insert row twice"
introws
that it was not the intended behaviour. If it's fine with you, I can open a PR changingforce
behavior when an id is present to insert with the given id field and not just performing the insertion and changing the object id. Conflict are already handled through the conflictPolicy