On 1 February 2012 11:07, amvis <vgrkrishnan@gmail.com> wrote:
>
>
> Colin simply i am saying here the truncate means, remove all the rows. so
> after the truncate, it should start from id 1.
> But now the default id start from the next to old one( that means
> 173,174.........).
Yes, that is the way it works. If you want anything different I
think you will have to put a column in the database (sequence for
example) and manage it yourself. Though I think it may be possible to
override the numbering system but I would not recommend it.
Did you not understand my request about top posting?
Colin
>
>
>
>
> On Wednesday, 1 February 2012 04:31:13 UTC-5, Colin Law wrote:
>>
>> On 1 February 2012 09:22, amvis <vgrkr...@gmail.com> wrote:
>>
>> Please don't top post, it makes it difficult to follow the thread.
>> Insert your reply at appropriate points in previous message. Thanks.
>>
>> > Thanks for the reply.
>> >
>> > Exactly what going on here is now,after the execution of one insertion
>> > some amount of data will insert, around 172 rows
>>
>> Is that what you expect or is that part of the problem?
>>
>> >, but after i truncate the
>> > tables
>>
>> What do you mean by truncate the tables? Do you mean you have removed
>> all the rows?
>>
>> >, again when i execute that operation, the row count starting from
>> > 173
>>
>> If there are still records in the database then you have not removed them.
>>
>> >... i think that happens of new object creation for each transaction...
>> > Also i want to know... how to do the one time object creation for all
>> > insertion in that code...?
>>
>> Sorry, I still don't understand exactly what you want. Please try and
>> write very carefully a bit at a time exactly what happens and what you
>> are want to happen.
>>
>> Colin
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment