Forum: Ruby on Rails habtm and :uniq

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
54532f023496410e0d7b1add5561ba45?d=identicon&s=25 Manuel Holtgrewe (Guest)
on 2006-04-11 16:52
(Received via mailing list)
Hi

I wonder what the state of this ticket is:

   http://dev.rubyonrails.org/ticket/2019

Does anyone have information regarding whether there are plans to fix
this behaviour? It seems strange to me to force uniqueness in Ruby
(i.e. application code) but not in the database.

For example, in activerecord/lib/active_record/associations/
has_and_belongs_to_many_association.rb there is a line which reads

   @reflection.options[:uniq] ? uniq(records) : records

This would be superflous if the "<<" operator checked for uniqueness.

I'd be grateful for any information on this topic.

Thanks,

Manuel Holtgrewe
This topic is locked and can not be replied to.