[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[eclipselink-users] Sequencing strategy and collisions
- From: cowwoc <cowwoc@xxxxxxxxxxxxxxxx>
- Date: Tue, 2 Sep 2008 01:43:08 -0700 (PDT)
- Delivered-to: firstname.lastname@example.org
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
- 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?
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.