Sigh. It is an existing database (not setup just for Ruby or Rails) with about
70,000 records. No auto-increment running on the database because that has
been handled by our current main application. If I do anything with Rails,
such that Rails implementation of Active Record relies on the database to
autoincrement, it is not going to happen because the database does not handle
that function in this application.
If the Active Record implementation on Rails can calculate the next id, fine,
it won''t create interference. I just don''t understand how
Rails determines
the next unique id if that is not handled by the database.
Peter
On Saturday 18 February 2006 20:20, Kevin Olbrich wrote:> If you set up the database according to the standard, the id column will
> be ''primary-key'' and
''auto-incremement''. Thus, the database does the
> incrementing, not ActiveRecord. My guess would be that if you supply
> the ID number and turn off the auto-increment, that it will work fine.
>
> _Kevin
>
> On Saturday, February 18, 2006, at 6:23 PM, Peter Hiltz wrote:
> >Our existing database uses id as primary key. Our current
> >application, not the
> >database itself, determines the next unique id for a new entry.
> >
> >How does Active Record create the unique integer? I.e, are we going to
run
> >into problems with starting points and existing ids?
> >
> >TIA.
> >_______________________________________________
> >Rails mailing list
> >Rails@lists.rubyonrails.org
> >http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>
>
>
> --
> Posted with http://DevLists.com. Sign up and save your time!
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>