Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8401331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:46:44+00:00 2026-06-09T21:46:44+00:00

In the development mode of Play framework, I inserted my initial-data.yml through Global.java. However,

  • 0

In the development mode of Play framework, I inserted my initial-data.yml through Global.java. However, if one model has more than 20 items, autu-generated IDs is going crazy.

For example, if I had:

computers:
- !!models.Computer
    name: apple01
- !!models.Computer
    name: apple02
- !!models.Computer
    name: apple03
- !!models.Computer
    name: apple04
       ...
- !!models.Computer
    name: apple20
- !!models.Computer
    name: apple21
- !!models.Computer
    name: apple22

From 1 to 20, they got correct auto-generated IDs by the order that I inserted. However, after 20, I could not get IDs that I intended. For example, the auto-generated ID of an item whose name is ‘apple22’ is 34. It’s weird. Is there anyone who knows why this happens?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:46:46+00:00Added an answer on June 9, 2026 at 9:46 pm

    I expect it’s batched fetching of sequences (section 10) and multiple threads/connections but there isn’t enough info in the question to tell.

    However a more useful answer might be to ask – why do you care? Being gappy doesn’t mean incorrect. Sequentially generated IDs like this should be internal opaque identifiers used only for joins and integrity and suchlike. Don’t depend on them being time ordered or non gappy, and don’t expose your application to them. If you need a key field with specific characteristics, you’re best off defining another one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My Rails app runs fine in development mode (without caching) but in production has
I have no problems with running it in development mode via rake jobs:work. However,
What is a right way to preload Rails model in development mode? Background: Rails
This is in development mode. ActiveRecord::StatementInvalid. This is an example: I have a model
My application is working great in development mode (with GWT-RPC calls), however whenever I
My rails app is working just fine when it is in development mode however
My app runs fine in development mode. When I run in production mode using
What is the difference between hosted mode and development mode in GWT?
Every time I change a .coffee file in the development mode, Rails creates a
I have a rails application, running in development mode ( with a sqlite database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.