NathanWolf / BukkitPlugins

My plugins for the Bukkit Minecraft server
mine.elmakers.com
14 stars 7 forks source link

Support autoincrementing values #26

Closed NathanWolf closed 13 years ago

NathanWolf commented 13 years ago

Support the "auto" modifier on the Persist annotation, to create an autoincrement value.

This is really only valid for ints, and then maybe only for ids (not sure), but for now I'll let the db sort that out.

NathanWolf commented 13 years ago

Implemented, but not tested.

NathanWolf commented 13 years ago

Re-implemented, and tested.

I decided to maintain my own autoincrementing values, instead of relying on the database. This was really necessary to keep object references in-tact in the cache without having to store them first- since, until they are stored, I can't get their id value from the database.