JDO2 defines particular id generation 
strategies ... "identity", "increment", "sequence", "uuid-string", "uuid-hex", 
"native".
Obviously implementations can define their own add-on strategies.

In XML we have free-form text and so people can just type 
<field value-strategy="auid"> and rely on the implementation providing one 
called "auid".
In Annotations they currently can't do this since it uses an enum.


Two possible options
1. Remove IdGeneratorStrategy enum and just let people type in 
the "valueStrategy" name (and @DatastoreIdentity "strategy"), so they can 
access implementations own variants too.
2. Make implementations use the @Extension to access these vendor add-on 
strategies and use IdGeneratorStrategy.UNKNOWN (which is in the enum 
currently)


I'm swaying towards 1 since its more consistent with XML specification. Any 
opinions ?

-- 
Andy  (Java Persistent Objects - http://www.jpox.org)

Reply via email to