Mysql 在Taggable_id快速增加时充当Taggable

Mysql 在Taggable_id快速增加时充当Taggable,mysql,ruby,ruby-on-rails-4,acts-as-taggable-on,Mysql,Ruby,Ruby On Rails 4,Acts As Taggable On,我从数据库中检索到54项: items = Item.where(condition) items.count == 54 and then: items.each {|i| i.tag_list.add("tag")} 但是: 返回此标记id的数组: [0, 0, 1, 1, 2, 2, 4, 4, 5, 5, 6, 6, 7, 7, 9, 9, 15, 15, 18, 18, 24, 25, 25, 32, 32, 38, 38, 49, 49, 74, 74, 93, 93, 96, 9

我从数据库中检索到54项:

items = Item.where(condition)
items.count == 54
and then:
items.each {|i| i.tag_list.add("tag")}
但是:

返回此
标记id的数组

[0, 0, 1, 1, 2, 2, 4, 4, 5, 5, 6, 6, 7, 7, 9, 9, 15, 15, 18, 18, 24, 25, 25, 32, 32, 38, 38, 49, 49, 74, 74, 93, 93, 96, 96, 99, 99, 363, 363, 583, 583, 854, 926, 926, 939, 939, 5276, 5276, 22118, 22118, 48474, 48474, 80172, 624486, 624486, 28184633, 28184633]

当te item count>100时,标记id超出范围并引发异常。因为它试图插入一个12位整数。

问题与
标记id
是一个十六进制字符串而不是整数有关。当rails将数字解析为整数时,它将变成一个
bigint

actsastaggaleon
目前不接受字符串作为外部标记ID

[0, 0, 1, 1, 2, 2, 4, 4, 5, 5, 6, 6, 7, 7, 9, 9, 15, 15, 18, 18, 24, 25, 25, 32, 32, 38, 38, 49, 49, 74, 74, 93, 93, 96, 96, 99, 99, 363, 363, 583, 583, 854, 926, 926, 939, 939, 5276, 5276, 22118, 22118, 48474, 48474, 80172, 624486, 624486, 28184633, 28184633]