forcedotcom/java-sdk — pull request #15 by davidbuccola (2011-12-20 21:09:08+00:00)
Title: Develop

Support the @GeneratedValue strategy of GenerationType.AUTO in addition to GenerationType.IDENTITY.

Unfortunately the restriction (from the previous version) that said a String id field had to be annotated with GenerationType.IDENTITY made it impossible to write portable JPA code. The other data stores (like Oracle or Postgres) expect a field annotated with a strategy of GenerationType.IDENTITY to be of type integer.

GenerationType.AUTO is a strategy that allows portable code to be written. GenerationType.AUTO allows the provider to choose the strategy and therefore we are free to choose "IDENTITY" while other data stores are allowed to choose what works best for them.