Ability to create autoincrementing column
Does persistence support creating tables which have an autoincrementing primary key column?
Submitted on 19 August 2010 at 17:29
Issue Log
In short, no.
persistence.js
automatically generates UUIDs for every entity. I posted a explanation of this design decision here. Hope that helps :)
I understand the design decision but I am curious as to the lacking functionality of creating an auto incrementing column in addition to the UUID that persistence generates. I hacked together an implementation in a local (and old) copy of persistence I have which makes the auto incrementing column the primary key and then has the UUID column become a unique column. I realize this solution is imperfect with server syncing solutions but it could be provided without much trouble as an additional feature if the database will only live on the clients side.
Alright. If you succeeded in implementing this, maybe you can contribute the patches (or even apply them to the current version of persistence.js)? That could be useful to others.
Log in to post comments