Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Sequencing strategy and collisions

Hi,

I am migrating a database from Hibernate to EclipseLink and in the process
the sequencing strategy has migrated from IDENTITY to AUTO under the MySQL
database. All of a sudden I am getting ID collisions because the "sequence"
table only contains one row ("seq_gen", maximumId) and in my case I've
already got existing Ids larger than maximumId (which defaulted to zero).

My question is:

- How is the default sequencing mechanism supposed to avoid collisions? Does
it simply assume that the id field will be big enough and will never roll
over? Even if I fix maximumId to be large enough for my existing dataset,
how does it guarantee no collisions in the future?

- What are the benefits of a global sequence number versus per-table
sequence number?
- How does one get JPA to use one row per table it is sequencing? Doesn't
this mechanism make it easier to cluster or split the database in the future
as your business grows?
- What is the ideal sequencing strategy in MySQL?

Thank you,
Gili
-- 
View this message in context: http://www.nabble.com/Sequencing-strategy-and-collisions-tp19266315p19266315.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top