|
Mh, the table strategy really feels unnatural and awkward to me with Neo4j. What we have there really is an emulation of sequences, with a node for each sequence.
Yes, technically we can map TABLE as well, but it requires us to store the table name as a label, which makes querying for id values more complex and inefficient (we need one specific query for each generator since labels can't be queried via parameters). Whereas for SEQUENCE we can work with one single query (with a parameter for the sequence name which is stored as property). Thus I'd only support AUTO and SEQUENCE.
Note that from within GridDialect#nextValue() we can't distinguish between TABLE and SEQUENCE, so we can't employ the more efficient pattern when SEQUENCE is actually used. I think it makes sense to improve this.
|