> JPA only support int / long for IDENTITY / AUTO/ SEQUENCE AFAIR
Do you have a reference for that? I had a (short) look into the spec and couldn't find anything. If that's the case, then that'd be a pity indeed.
I looked and could not find any explicit reference. sequence and table have to be numbers as you define an initial value. And the only identity columns available in RDBMS uses monotonic whole number sources. You can infer from that that only Integer or Long are acceptable types. It's a bit open for interpretation.
> It makes the migration of an application from an RDBMS to a NoSQL harder
Harder in which way? It's my understanding that when using IDENTITY and moving from one RDMBS to another which doesn't support that strategy, I'd get an error as well. So I'd either have to change it into a supported strategy or use AUTO. I think it'd be the same when moving to a NoSQL store not supporting the currently configured strategy.
Harder in the sense that not only do you need to change the generation strategy but you also need to change the identity type and value of all your objects (and the foreign key references).
|