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 183623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:08:56+00:00 2026-05-11T15:08:56+00:00

As described in this article , I am using automatic associations in fixtures. For

  • 0

As described in this article, I am using automatic associations in fixtures. For example, if a region object has a country id, instead of doing ‘country_id’: 1, I do ‘country’: ‘USA’. ‘USA’ is a label in my countries.yml file, so fixtures knows how to take care of this. However, this only works when you do not specify an ID value for the countries object. So I cannot assign USA’s ID to be 1. But if I do not assign it to be 1, it ends up being some large value 8974343…which is kinda strange. Is there a way to get fixtures to auto-generate id’s that are not super high? ….or is this ok?

  • 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. 2026-05-11T15:08:57+00:00Added an answer on May 11, 2026 at 3:08 pm

    Reading the API documentation, this is exactly how autogenerated fixtures are supposed to behave — if you want to have a specific ID value for a fixture in advance, you should probably just assign it yourself.

    If not, well, from the API docs:

    The generated ID for a given label is constant, so we can discover any fixture‘s ID without loading anything, as long as we know the label. 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, addAsync chaining in a flexunit test as described in this article
I've read this article but it doesn't appear to use the ApplicationPool class described
I'm using PHP to create maintainable stylesheets, as described in the following article: http://www.barelyfitz.com/projects/csscolor/
This article describes a way, in C#, to allow the addition of arbitrary value
I'm trying to implement the Media Player custom field control described in this MSDN
I've long been a fan of Stored Procedure Keyboard Accelerators, as described in this
I'm not sure how to describe this problem, so I think an example is
This link describes an exploit into my app using fckEditor: http://knitinr.blogspot.com/2008/07/script-exploit-via-fckeditor.html How do I
This isn't a very simple question, but hopefully someone has run across it. I
Recently I came to know from this article - http://blogs.msdn.com/b/patrickdanino/archive/2009/11/11/custom-controls-and-ui-automation.aspx -that controls in WPF

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.